Commit Graph

28 Commits

Author SHA1 Message Date
Johnny Chen 6cd4d1d85a Modified to take advantage of the iteration protocol for our lldb container objects.
llvm-svn: 130457
2011-04-28 23:34:58 +00:00
Johnny Chen 511e8c0d36 Add a Python script which launches a program from within lldb and loop until the
process stops for some reason.  main.c (compiled into a.out) is used as an example in
the README-run-until-faulted file.

llvm-svn: 128755
2011-04-02 01:20:28 +00:00
Johnny Chen d16c105c3d Take advantage of the newly added SBSymbol.GetType() API to check whether we
have a Code symbol and do disassembly on it.

llvm-svn: 128604
2011-03-31 01:34:55 +00:00
Johnny Chen 0e43f321b6 Add a generator to iterate through the code symbols for a given target.
To be modified to take advantage of the new SBSymbol API which checks a symbol for its type.

llvm-svn: 128601
2011-03-31 01:06:28 +00:00
Johnny Chen 318e7ba65d Add an option to specify the symbols to disassemble instead of the existing 'num of symbols to disassemble'
option.  If both are present, the 'symbols to disassemble' overrides the 'num of symbols to disassemble'.

An example usage:

$ ./lldb-disasm.py -C 'platform create remote-ios' -e /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/lib/libSystem.B.dylib -o '-r -n' -s vprintf -s acosf_special

llvm-svn: 128569
2011-03-30 18:47:54 +00:00
Johnny Chen 6454e15f49 Add the ability to invoke lldb's disassemble command on the symbols digested from
the 'image dump symtab' command.  The number of symbols to disassemble can be
specified by the '-n Num' option, or unlimited if not specified.

llvm-svn: 128442
2011-03-29 01:07:00 +00:00
Johnny Chen 4044fdccfc Doc string change.
llvm-svn: 128429
2011-03-28 22:48:25 +00:00
Johnny Chen 5e28aa5d9b Add an initial version of lldb-disasm.py script whose purpose is to iterate through
all the symbols for an executable image and to issue the lldb 'disassemble' command
on each symbol.  The initial version just dumps the symbol table.

llvm-svn: 128428
2011-03-28 22:40:32 +00:00
Johnny Chen 9d46337511 Add options to allow for specifying an option string when spawning gdb and for executing
command(s) right after starting up gdb.  Update the README file to show an example of
using these to pass '-arch armv7' to gdb and to execute gdb command to set shared library
path substitutions before loading iOS4.3 sdk's /usr/lib/libSystem.B.dylib and disassembling
the 'printf' function.

llvm-svn: 128040
2011-03-21 23:44:44 +00:00
Johnny Chen 31d446aa5c Fix a typo in the message string.
llvm-svn: 128034
2011-03-21 23:01:34 +00:00
Johnny Chen 5c07daaa1d Modify disasm.py to better deal with the objc method name which has ':' in them.
Add a utility similar to disasm.py, but which provides a shell-like environment for invoking llvm-mc.

llvm-svn: 127936
2011-03-19 01:24:25 +00:00
Johnny Chen 0d825132c6 Tidy up the input file given to 'llvm-mc -disassemble' and also append the gdb
assembler code to the memory dump.

llvm-svn: 127823
2011-03-17 19:05:34 +00:00
Johnny Chen 6f6fb3e515 Add a Python script to take an executable, run gdb to disassemble a function,
read the memory contents of the function, and then feed the bytes to the
'llvm-mc -disassemble' command.

It uses the pexpect module located under ToT/test/pexpect-2.4 directory to
automate the interaction with gdb.  This is used initially to test the low
level ARM disassembler of llvm.

llvm-svn: 127785
2011-03-17 00:59:57 +00:00
Johnny Chen 0e65ce3de8 Add readme on the version of emacs that works with lldb-enhanced gud.el,
for Stuart Hastings. :-)

llvm-svn: 126469
2011-02-25 01:51:25 +00:00
Johnny Chen e1e020dc29 The lldb-enhanced gud.el does not work on emacs 22.1.1 (dumb terminal).
This is the error I got:

Debugger entered--Lisp error: (void-function split-string-and-unquote)
  (split-string-and-unquote command-line)
  (let* ((words ...) (program ...) (dir default-directory) (file-word ...) (file-subst ...) (args ...) (file ...) (filepart ...) (existing-buffer ...)) (pop-to$
  gud-common-init("/Volumes/data/lldb/svn/trunk/build/Debug/lldb" nil gud-lldb-marker-filter)
  lldb("/Volumes/data/lldb/svn/trunk/build/Debug/lldb")
  call-interactively(lldb)
  execute-extended-command(nil)
  call-interactively(execute-extended-command)

The gud-common-init elisp function references split-string-and-unquote function
which is not defined there.

llvm-svn: 126449
2011-02-24 23:13:28 +00:00
Johnny Chen dacc14c995 Updated README file.
llvm-svn: 125527
2011-02-14 22:25:44 +00:00
Johnny Chen 25c04838e9 The recent change in argument parsing is messing up the emacs lldb mode's capability to properly
scan the debugger output for program counter when it comes to the output of 'Up Stack' or 'Down Stack'
gud commands.  Remove the single quotes around the argument strings for "settings set frame-format"
and "settings set thread-format" commands to avoid the single quotes which were being emitted as part
of the debugger output.

llvm-svn: 122286
2010-12-20 22:58:58 +00:00
Johnny Chen 7ac81906ea Modify the regexp to match the debugger output of the 'Up Stack' and 'Down Stack'
gud commands in order to more reliably locate the program counter and to display
the file-and-line.

llvm-svn: 122020
2010-12-17 01:35:41 +00:00
Johnny Chen 43b3bad58b Initial check-in of a Python utility to run the lldb test suite and send the
result including the session logs of test failures/errors as a MIME message.

llvm-svn: 119371
2010-11-16 19:44:50 +00:00
Johnny Chen 31f29e98bf Add keyboard shortcuts:
'run'          => Control-C r (gud-run)            "Run the program."
'process kill' => Control-C s (gud-stop-subjoball) "Stop the program."

llvm-svn: 118460
2010-11-09 00:24:51 +00:00
Johnny Chen 2f53b943e4 Make lldb dump fullpath instead of just basename when printing out frame or
thread descriptions.  This allows for correctly finding and obeying the last
filename-and-line marker from the debugger.

Add a delay for gud-up and gud-down.  This makes tracking filename-and-line
more reliable when moving up/down the stack.

llvm-svn: 118277
2010-11-05 16:51:44 +00:00
Johnny Chen 7e329d0d2a Add keyboard shortcuts:
'thread backtrace'     => Control-C b (gud-bt)     "Show stack for the current thread."
'thread backtrace all' => Control-C B (gud-bt-all) "Show stacks for all the threads."

Change the function name of one existing shortcut:

'breakpoint list"      => Control-C l (gud-listb)  "List all breakpoints."

llvm-svn: 117933
2010-11-01 17:29:38 +00:00
Johnny Chen 2e1615ea8e Change the README to reflect the new the screen shot file name lldb-gud-window.png.
llvm-svn: 117926
2010-11-01 16:39:24 +00:00
Benjamin Kramer e1e6797b07 Compress screenshot.
llvm-svn: 117778
2010-10-30 08:27:07 +00:00
Johnny Chen 886ec7800a Submit the screen capture as a followup of r117752.
llvm-svn: 117777
2010-10-30 07:36:05 +00:00
Johnny Chen 6aa0dc1e26 Initial port of lldb debugging mode to run under Emacs's Grand Unified Debugger (gud.el).
The gud.el is modified from 22.3.1 version to add lldb stuffs, the gud-diffs.txt is the
diff file.

lldb-gud-window.tiff is a screen capture of Aquamacs 2.1 (which has 23.2.50.1) after
loading this modified gud.el, changing directory to test/conditional_break, and then
'M-x lldb' with the a.out file.

The lldb-gud-window.tiff will be submitted in another check in.

llvm-svn: 117752
2010-10-30 00:34:37 +00:00
Johnny Chen 2ed83824af Delete the directory, will try to resubmit later.
llvm-svn: 117751
2010-10-30 00:30:24 +00:00
Johnny Chen 7d5cd97080 Initial port of lldb debugging mode to run under Emacs's Grand Unified Debugger (gud.el).
The gud.el is modified from 22.3.1 version to add lldb stuffs, the gud-diffs.txt is the
diff file.

lldb-gud-window.tiff is a screen capture of Aquamacs 2.1 (which has 23.2.50.1) after
loading this modified gud.el, changing directory to test/conditional_break, and then
'M-x lldb' with the a.out file.

llvm-svn: 117748
2010-10-29 23:55:46 +00:00