]> git.pld-linux.org Git - packages/gdb.git/blame - gdb-6.3-bt-past-zero-20051201.patch
- updated (performance fixes).
[packages/gdb.git] / gdb-6.3-bt-past-zero-20051201.patch
CommitLineData
3a58abaf
AM
12005-12-01 Jeff Johnston <jjohnstn@redhat.com>
2
3 * frame.c (backtrace_past_zero_pc): New static variable.
4 (get_prev_frame): Don't return NULL for zero pc value if
5 backtrace past-zero-frame option is turned on.
6 (_initialize_frame): Initialize new command to allow backtracing
7 past a zero pc value (set backtrace past-zero-pc).
8
9testsuite/gdb.base:
102005-12-01 Jeff Johnston <jjohnstn@redhat.com>
11
12 * setshow.exp: Add testing of "set backtrace past-zero-pc" option.
13
142007-10-15 Jan Kratochvil <jan.kratochvil@redhat.com>
15
16 Port to GDB-6.7.
17
51a5ef0f 18Index: gdb-7.1.90.20100711/gdb/testsuite/gdb.base/setshow.exp
3a58abaf 19===================================================================
51a5ef0f
PS
20--- gdb-7.1.90.20100711.orig/gdb/testsuite/gdb.base/setshow.exp 2010-06-11 22:56:06.000000000 +0200
21+++ gdb-7.1.90.20100711/gdb/testsuite/gdb.base/setshow.exp 2010-07-12 10:46:06.000000000 +0200
22@@ -96,6 +96,16 @@ if { ![target_info exists use_gdb_stub]
3a58abaf
AM
23 delete_breakpoints
24 gdb_test "run" "Starting program:.*foo bar blup baz bubble.*" "passing args"
25 }
26+#test show backtrace past-zero-pc
27+gdb_test "show backtrace past-zero-pc" "Whether backtraces should continue past a zero pc value is off." "default show backtrace past-zero-pc (off)"
28+#test set backtrace past-zero-pc on
29+gdb_test "set backtrace past-zero-pc on" "" "set backtrace past-zero-pc on"
30+#test show backtrace past-zero-pc
31+gdb_test "show backtrace past-zero-pc" "Whether backtraces should continue past a zero pc value is on." "show backtrace past-zero-pc (on)"
32+#test set backtrace past-zero-pc off
33+gdb_test "set backtrace past-zero-pc off" "" "set backtrace past-zero-pc off"
34+#test show backtrace past-zero-pc
35+gdb_test "show backtrace past-zero-pc" "Whether backtraces should continue past a zero pc value is off." "show backtrace past-zero-pc (off)"
36 #test set check range on
51a5ef0f 37 gdb_test "set check range on" ".*" "set check range on"
3a58abaf 38 #test show check range on
51a5ef0f 39Index: gdb-7.1.90.20100711/gdb/frame.c
3a58abaf 40===================================================================
51a5ef0f
PS
41--- gdb-7.1.90.20100711.orig/gdb/frame.c 2010-07-12 10:00:56.000000000 +0200
42+++ gdb-7.1.90.20100711/gdb/frame.c 2010-07-12 10:45:18.000000000 +0200
43@@ -185,6 +185,16 @@ Whether backtraces should continue past
3a58abaf
AM
44 value);
45 }
46
47+static int backtrace_past_zero_pc;
48+static void
49+show_backtrace_past_zero_pc (struct ui_file *file, int from_tty,
50+ struct cmd_list_element *c, const char *value)
51+{
52+ fprintf_filtered (file, _("\
53+Whether backtraces should continue past a zero pc value is %s.\n"),
54+ value);
55+}
56+
57 static int backtrace_past_entry;
58 static void
59 show_backtrace_past_entry (struct ui_file *file, int from_tty,
51a5ef0f 60@@ -1784,9 +1794,7 @@ get_prev_frame (struct frame_info *this_
3a58abaf
AM
61 }
62
63 if (this_frame->level > 0
64-#if 0
65- && backtrace_past_zero_pc
66-#endif
67+ && !backtrace_past_zero_pc
68 && get_frame_type (this_frame) == NORMAL_FRAME
69 && get_frame_type (get_next_frame (this_frame)) == NORMAL_FRAME
70 && get_frame_pc (this_frame) == 0)
51a5ef0f 71@@ -2271,6 +2279,17 @@ the rest of the stack trace."),
3a58abaf
AM
72 &set_backtrace_cmdlist,
73 &show_backtrace_cmdlist);
74
75+ add_setshow_boolean_cmd ("past-zero-pc", class_obscure,
76+ &backtrace_past_zero_pc, _("\
77+Set whether backtraces should continue past a zero pc value."), _("\
78+Show whether backtraces should continue past a zero pc value."), _("\
79+Normally GDB stops backtracing when it finds a zero pc.\n\
80+Set this variable if you need to see the rest of the stack trace."),
81+ NULL,
82+ show_backtrace_past_zero_pc,
83+ &set_backtrace_cmdlist,
84+ &show_backtrace_cmdlist);
85+
86 add_setshow_integer_cmd ("limit", class_obscure,
87 &backtrace_limit, _("\
88 Set an upper bound on the number of backtrace levels."), _("\
This page took 0.043426 seconds and 4 git commands to generate.