diff options
author | Greg Clayton <gclayton@apple.com> | 2013-02-08 02:54:24 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2013-02-08 02:54:24 +0000 |
commit | 722e8851b14270c9ac3d51a0685803f538423a80 (patch) | |
tree | a0079b86c468e1440978d93761da75845ab34cb5 | |
parent | a245d3e1fc9aecefd136d23110d73410bf01e267 (diff) | |
download | bcm5719-llvm-722e8851b14270c9ac3d51a0685803f538423a80.tar.gz bcm5719-llvm-722e8851b14270c9ac3d51a0685803f538423a80.zip |
Added the ability to specify a breakpoint using the GDB '*ADDRESS' format:
(lldb) b *0x1234
You can still of course just specify an address:
(lldb) b 0x1234
Also now we accept the '&' before function names to indicate to not to skip the function prologue like GDB supports. To see how this works:
(lldb) settings set interpreter.expand-regex-aliases 1
(lldb) b &main
breakpoint set --name 'main' --skip-prologue=0
Breakpoint 1: where = a.out`main at main.c:20, address = 0x0000000100000b60
(lldb) b main
breakpoint set --name 'main'
Breakpoint 2: where = a.out`main + 54 at main.c:21, address = 0x0000000100000b96
llvm-svn: 174695
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 6f83ede8ff3..240d37b165c 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -395,10 +395,11 @@ CommandInterpreter::LoadCommandDictionary () const char *break_regexes[][2] = {{"^(.*[^[:space:]])[[:space:]]*:[[:space:]]*([[:digit:]]+)[[:space:]]*$", "breakpoint set --file '%1' --line %2"}, {"^([[:digit:]]+)[[:space:]]*$", "breakpoint set --line %1"}, - {"^(0x[[:xdigit:]]+)[[:space:]]*$", "breakpoint set --address %1"}, + {"^\\*?(0x[[:xdigit:]]+)[[:space:]]*$", "breakpoint set --address %1"}, {"^[\"']?([-+]?\\[.*\\])[\"']?[[:space:]]*$", "breakpoint set --name '%1'"}, {"^(-.*)$", "breakpoint set %1"}, {"^(.*[^[:space:]])`(.*[^[:space:]])[[:space:]]*$", "breakpoint set --name '%2' --shlib '%1'"}, + {"^\\&(.*[^[:space:]])[[:space:]]*$", "breakpoint set --name '%1' --skip-prologue=0"}, {"^(.*[^[:space:]])[[:space:]]*$", "breakpoint set --name '%1'"}}; size_t num_regexes = sizeof break_regexes/sizeof(char *[2]); |