From 43c73eff13ebb9d0e493de7ad40d23328cf5bd71 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Fri, 21 Feb 2014 13:13:45 +0100 Subject: [PATCH] Adapt GDB commands to ldso changes Issue #1042. --- os/src/app/cli_monitor/gdb_command.h | 4 ++-- ports/run/gdb_monitor.inc | 28 ++++++++++++++-------------- ports/run/noux_gdb.run | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/os/src/app/cli_monitor/gdb_command.h b/os/src/app/cli_monitor/gdb_command.h index 699a6320f..03307016c 100644 --- a/os/src/app/cli_monitor/gdb_command.h +++ b/os/src/app/cli_monitor/gdb_command.h @@ -260,11 +260,11 @@ struct Gdb_command : Command snprintf(gdb_main_breakpoint_args_buf, sizeof(gdb_main_breakpoint_args_buf), "\n \ - \n \ + \n \ \n \ \n \ \n \ - \n \ + \n \ \n \ \n \ \n \ diff --git a/ports/run/gdb_monitor.inc b/ports/run/gdb_monitor.inc index d73efd056..62d429b7e 100644 --- a/ports/run/gdb_monitor.inc +++ b/ports/run/gdb_monitor.inc @@ -15,34 +15,34 @@ proc gdb_main_breakpoint_cmds { target_binary_name } { # set gdb_cmds "" - + # don't ask for y/n when loading a new symbol file append gdb_cmds {-ex "set interactive-mode off" } - + # load the symbols of ld.lib.so append gdb_cmds {-ex "symbol-file bin/ld.lib.so" } - - # set a breakpoint in the 'call_main()' function - append gdb_cmds {-ex "b call_main" } - + + # set a breakpoint in the 'call_program_main()' function + append gdb_cmds {-ex "b call_program_main" } + # continue execution until the breakpoint triggers append gdb_cmds {-ex "c" } - - # delete the 'call_main()' breakpoint + + # delete the 'call_program_main()' breakpoint append gdb_cmds {-ex "delete 1" } - + # load the symbols of the test application append gdb_cmds "-ex \"symbol-file bin/$target_binary_name\" " - + # set a breakpoint in the application's 'main()' function - append gdb_cmds {-ex "b main" } - + append gdb_cmds {-ex "b main()" } + # load the symbols of loaded shared libraries append gdb_cmds {-ex "sharedlibrary" } - + # continue execution until the breakpoint triggers append gdb_cmds {-ex "c" } - + # delete the 'main()' breakpoint append gdb_cmds {-ex "delete 2" } diff --git a/ports/run/noux_gdb.run b/ports/run/noux_gdb.run index cf4239b05..fe7d5fc38 100644 --- a/ports/run/noux_gdb.run +++ b/ports/run/noux_gdb.run @@ -173,13 +173,13 @@ append config { - + } append config " " append config { - +