[Lldb-commits] [lldb] r321651 - [ARM64] Remove unused function. NFCI.

2018-01-02 Thread Davide Italiano via lldb-commits
Author: davide
Date: Tue Jan  2 08:22:09 2018
New Revision: 321651

URL: http://llvm.org/viewvc/llvm-project?rev=321651&view=rev
Log:
[ARM64] Remove unused function. NFCI.

Modified:
lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp

Modified: 
lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp?rev=321651&r1=321650&r2=321651&view=diff
==
--- lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp 
(original)
+++ lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp Tue 
Jan  2 08:22:09 2018
@@ -76,19 +76,6 @@ static inline bool IsZero(uint64_t x) {
 
 static inline uint64_t NOT(uint64_t x) { return ~x; }
 
-#if 0
-// LSL_C() 
-// ===
-static inline uint64_t
-LSL_C (uint64_t x, integer shift, bool &carry_out)
-{
-assert (shift >= 0); 
-uint64_t result = x << shift;
-carry_out = ((1ull << (64-1)) >> (shift - 1)) != 0;
-return result;
-}
-#endif
-
 // LSL()
 // =
 


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r321652 - [MacOSX-Kernel] Remove broken KDP_IMAGEPATH support.

2018-01-02 Thread Davide Italiano via lldb-commits
Author: davide
Date: Tue Jan  2 08:24:30 2018
New Revision: 321652

URL: http://llvm.org/viewvc/llvm-project?rev=321652&view=rev
Log:
[MacOSX-Kernel] Remove broken KDP_IMAGEPATH support.

Modified:
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp

Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp?rev=321652&r1=321651&r2=321652&view=diff
==
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp 
(original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp Tue 
Jan  2 08:24:30 2018
@@ -59,15 +59,6 @@ bool CommunicationKDP::SendRequestPacket
   return SendRequestPacketNoLock(request_packet);
 }
 
-#if 0
-typedef struct {
-   uint8_t request;// Either: CommandType | ePacketTypeRequest, or 
CommandType | ePacketTypeReply
-   uint8_t sequence;
-   uint16_tlength; // Length of entire packet including 
this header
-   uint32_tkey;// Session key
-} kdp_hdr_t;
-#endif
-
 void CommunicationKDP::MakeRequestPacketHeader(CommandType request_type,
PacketStreamType 
&request_packet,
uint16_t request_length) {
@@ -436,34 +427,6 @@ bool CommunicationKDP::SendRequestVersio
   return false;
 }
 
-#if 0 // Disable KDP_IMAGEPATH for now, it seems to hang the KDP connection...
-const char *
-CommunicationKDP::GetImagePath ()
-{
-if (m_image_path.empty())
-SendRequestImagePath();
-return m_image_path.c_str();
-}
-
-bool
-CommunicationKDP::SendRequestImagePath ()
-{
-PacketStreamType request_packet (Stream::eBinary, m_addr_byte_size, 
m_byte_order);
-const CommandType command = KDP_IMAGEPATH;
-const uint32_t command_length = 8;
-MakeRequestPacketHeader (command, request_packet, command_length);
-DataExtractor reply_packet;
-if (SendRequestAndGetReply (command, request_packet, reply_packet))
-{
-const char *path = reply_packet.PeekCStr(8);
-if (path && path[0])
-m_kernel_version.assign (path);
-return true;
-}
-return false;
-}
-#endif
-
 uint32_t CommunicationKDP::GetCPUMask() {
   if (!HostInfoIsValid())
 SendRequestHostInfo();


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r321654 - [Core/Debugger] Remove some code that doesn't compile anymore.

2018-01-02 Thread Davide Italiano via lldb-commits
Author: davide
Date: Tue Jan  2 08:27:01 2018
New Revision: 321654

URL: http://llvm.org/viewvc/llvm-project?rev=321654&view=rev
Log:
[Core/Debugger] Remove some code that doesn't compile anymore.

Modified:
lldb/trunk/source/Core/Debugger.cpp

Modified: lldb/trunk/source/Core/Debugger.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=321654&r1=321653&r2=321654&view=diff
==
--- lldb/trunk/source/Core/Debugger.cpp (original)
+++ lldb/trunk/source/Core/Debugger.cpp Tue Jan  2 08:27:01 2018
@@ -1162,75 +1162,6 @@ DebuggerSP Debugger::FindDebuggerWithID(
   return debugger_sp;
 }
 
-#if 0
-static void
-TestPromptFormats (StackFrame *frame)
-{
-if (frame == nullptr)
-return;
-
-StreamString s;
-const char *prompt_format =
-"{addr = '${addr}'\n}"
-"{addr-file-or-load = '${addr-file-or-load}'\n}"
-"{current-pc-arrow = '${current-pc-arrow}'\n}"
-"{process.id = '${process.id}'\n}"
-"{process.name = '${process.name}'\n}"
-"{process.file.basename = '${process.file.basename}'\n}"
-"{process.file.fullpath = '${process.file.fullpath}'\n}"
-"{thread.id = '${thread.id}'\n}"
-"{thread.index = '${thread.index}'\n}"
-"{thread.name = '${thread.name}'\n}"
-"{thread.queue = '${thread.queue}'\n}"
-"{thread.stop-reason = '${thread.stop-reason}'\n}"
-"{target.arch = '${target.arch}'\n}"
-"{module.file.basename = '${module.file.basename}'\n}"
-"{module.file.fullpath = '${module.file.fullpath}'\n}"
-"{file.basename = '${file.basename}'\n}"
-"{file.fullpath = '${file.fullpath}'\n}"
-"{frame.index = '${frame.index}'\n}"
-"{frame.pc = '${frame.pc}'\n}"
-"{frame.sp = '${frame.sp}'\n}"
-"{frame.fp = '${frame.fp}'\n}"
-"{frame.flags = '${frame.flags}'\n}"
-"{frame.reg.rdi = '${frame.reg.rdi}'\n}"
-"{frame.reg.rip = '${frame.reg.rip}'\n}"
-"{frame.reg.rsp = '${frame.reg.rsp}'\n}"
-"{frame.reg.rbp = '${frame.reg.rbp}'\n}"
-"{frame.reg.rflags = '${frame.reg.rflags}'\n}"
-"{frame.reg.xmm0 = '${frame.reg.xmm0}'\n}"
-"{frame.reg.carp = '${frame.reg.carp}'\n}"
-"{function.id = '${function.id}'\n}"
-"{function.changed = '${function.changed}'\n}"
-"{function.initial-function = '${function.initial-function}'\n}"
-"{function.name = '${function.name}'\n}"
-"{function.name-without-args = '${function.name-without-args}'\n}"
-"{function.name-with-args = '${function.name-with-args}'\n}"
-"{function.addr-offset = '${function.addr-offset}'\n}"
-"{function.concrete-only-addr-offset-no-padding = 
'${function.concrete-only-addr-offset-no-padding}'\n}"
-"{function.line-offset = '${function.line-offset}'\n}"
-"{function.pc-offset = '${function.pc-offset}'\n}"
-"{line.file.basename = '${line.file.basename}'\n}"
-"{line.file.fullpath = '${line.file.fullpath}'\n}"
-"{line.number = '${line.number}'\n}"
-"{line.start-addr = '${line.start-addr}'\n}"
-"{line.end-addr = '${line.end-addr}'\n}"
-;
-
-SymbolContext sc (frame->GetSymbolContext(eSymbolContextEverything));
-ExecutionContext exe_ctx;
-frame->CalculateExecutionContext(exe_ctx);
-if (Debugger::FormatPrompt (prompt_format, &sc, &exe_ctx, 
&sc.line_entry.range.GetBaseAddress(), s))
-{
-printf("%s\n", s.GetData());
-}
-else
-{
-printf ("what we got: %s\n", s.GetData());
-}
-}
-#endif
-
 bool Debugger::FormatDisassemblerAddress(const FormatEntity::Entry *format,
  const SymbolContext *sc,
  const SymbolContext *prev_sc,


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r321271 - Work around test failures on red-hat linux

2018-01-02 Thread Jim Ingham via lldb-commits
This is a trivial thing, but you can use:

   lldbutil.run_break_set_by_source_regexp

rather than having to capture the line number matching the regex and setting a 
line breakpoint from that.  You are setting them in different source files, so 
you'll have to pass:

extra_options = "-f 'One/One.c'"

etc.But that's still a lot more readable.

Jim

> On Dec 21, 2017, at 6:40 AM, Pavel Labath via lldb-commits 
>  wrote:
> 
> +self.One_line = line_number('One/One.c', '// break here')
> +self.Two_line = line_number('Two/Two.c', '// break here')
> +self.main_line = line_number('main.c', '// break here')
> +
> def test_conflicting_symbols(self):
> self.build()
> exe = os.path.join(os.getcwd(), "a.out")
> @@ -27,15 +34,12 @@ class TestConflictingSymbols(TestBase):
> environment = self.registerSharedLibrariesWithTarget(
> target, ['One', 'Two'])
> 
> -One_line = line_number('One/One.c', '// break here')
> -Two_line = line_number('Two/Two.c', '// break here')
> -main_line = line_number('main.c', '// break here')
> lldbutil.run_break_set_command(
> -self, 'breakpoint set -f One.c -l %s' % (One_line))
> +self, 'breakpoint set -f One.c -l %s' % (self.One_line))
> lldbutil.run_break_set_command(
> -self, 'breakpoint set -f Two.c -l %s' % (Two_line))
> +self, 'breakpoint set -f Two.c -l %s' % (self.Two_line))
> lldbutil.run_break_set_by_file_and_line(
> -self, 'main.c', main_line, num_expected_locations=1, 
> loc_exact=True)
> +self, 'main.c', self.main_line, num_expected_locations=1, 
> loc_exact=True)
> 

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D41427: Fix crash when parsing the type of a function without any arguments

2018-01-02 Thread Aaron Smith via Phabricator via lldb-commits
asmith added a comment.

Do you prefer to drop the test changes and corresponding binaries? 
For an llvm-lit test, which directory do you recommend for the new file?


Repository:
  rL LLVM

https://reviews.llvm.org/D41427



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D41427: Fix crash when parsing the type of a function without any arguments

2018-01-02 Thread Zachary Turner via lldb-commits
Something under lldb\lit.  Can make a new directory, like DebugInfo\PDB or
something.

On Tue, Jan 2, 2018 at 9:10 PM Aaron Smith via Phabricator <
revi...@reviews.llvm.org> wrote:

> asmith added a comment.
>
> Do you prefer to drop the test changes and corresponding binaries?
> For an llvm-lit test, which directory do you recommend for the new file?
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D41427
>
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits