+2008-02-26 Nick Roberts <nickrob@snap.net.nz>
+
+ * breakpoint.c (print_one_breakpoint_location): Revert Enb field
+ to old format. Discard breakpoint address if shared library is
+ unloaded.
+ (breakpoint_1): Adjust formatting of table header accordingly.
+
2008-02-25 Vladimir Prus <vladimir@codesourcery.com>
* remote.c (remote_get_threadlist): If the response
/* 4 */
annotate_field (3);
if (part_of_multiple)
- ui_out_field_string (uiout, "enabled",
- loc->shlib_disabled
- ? (loc->enabled ? "y(p)" : "n(p)")
- : (loc->enabled ? "y" : "n"));
+ ui_out_field_string (uiout, "enabled", loc->enabled ? "y" : "n");
else
- {
- int pending = (b->loc == NULL || b->loc->shlib_disabled);
- /* For header of multiple, there's no point showing pending
- state -- it will be apparent from the locations. */
- if (header_of_multiple)
- pending = 0;
- ui_out_field_fmt (uiout, "enabled", "%c%s",
- bpenables[(int) b->enable_state],
- pending ? "(p)" : "");
- if (!pending)
- ui_out_spaces (uiout, 3);
- }
+ ui_out_field_fmt (uiout, "enabled", "%c",
+ bpenables[(int) b->enable_state]);
+ ui_out_spaces (uiout, 2);
/* 5 and 6 */
if (addressprint)
{
annotate_field (4);
- if (b->loc == NULL)
- ui_out_field_string (uiout, "addr", "<PENDING>");
- else if (header_of_multiple)
+ if (header_of_multiple)
ui_out_field_string (uiout, "addr", "<MULTIPLE>");
+ if (b->loc == NULL || loc->shlib_disabled)
+ ui_out_field_string (uiout, "addr", "<PENDING>");
else
ui_out_field_core_addr (uiout, "addr", loc->address);
}
ui_out_table_header (uiout, 4, ui_left, "disp", "Disp"); /* 3 */
if (nr_printable_breakpoints > 0)
annotate_field (3);
- ui_out_table_header (uiout, 4, ui_left, "enabled", "Enb"); /* 4 */
+ ui_out_table_header (uiout, 3, ui_left, "enabled", "Enb"); /* 4 */
if (addressprint)
{
if (nr_printable_breakpoints > 0)
+2008-02-26 Vladimir Prus <vladimir@codesourcery.com>
+
+ * gdb.base/annota1.exp: Adjust for 'info break'
+ format changes.
+ * gdb.base/annota3.exp: Likewise.
+ * gdb.base/break.exp: Likewise.
+ * gdb.base/condbreak.exp: Likewise.
+ * gdb.base/pending.exp: Likewise.
+ * gdb.base/sepdebug.exp: Likewise.
+ * gdb.base/unload.exp: Likewise.
+ * gdb.cp/ovldbreak.exp: Likewise.
+ * gdb.mi/mi-pending.exp: Likewise.
+
2008-02-07 Doug Evans <dje@google.com>
* gdb.cp/mb-inline.exp: New.
#
send_gdb "info break\n"
gdb_expect {
- -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-headers\r\n\r\n\032\032field 0\r\nNum \r\n\032\032field 1\r\nType \r\n\032\032field 2\r\nDisp \r\n\032\032field 3\r\nEnb \r\n\032\032field 4\r\nAddress +\r\n\032\032field 5\r\nWhat\r\n\r\n\032\032breakpoints-table\r\n\r\n\032\032record\r\n\r\n\032\032field 0\r\n1 \r\n\032\032field 1\r\nbreakpoint \r\n\032\032field 2\r\nkeep \r\n\032\032field 3\r\ny \r\n\032\032field 4\r\n$hex +\r\n\032\032field 5\r\nin main at ${escapedsrcfile}:$main_line\r\n\r\n\032\032breakpoints-table-end\r\n$gdb_prompt$" \
+ -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-headers\r\n\r\n\032\032field 0\r\nNum \r\n\032\032field 1\r\nType \r\n\032\032field 2\r\nDisp \r\n\032\032field 3\r\nEnb \r\n\032\032field 4\r\nAddress +\r\n\032\032field 5\r\nWhat\r\n\r\n\032\032breakpoints-table\r\n\r\n\032\032record\r\n\r\n\032\032field 0\r\n1 \r\n\032\032field 1\r\nbreakpoint \r\n\032\032field 2\r\nkeep \r\n\032\032field 3\r\ny \r\n\032\032field 4\r\n$hex +\r\n\032\032field 5\r\nin main at ${escapedsrcfile}:$main_line\r\n\r\n\032\032breakpoints-table-end\r\n$gdb_prompt$" \
{pass "breakpoint info"}
- -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-headers\r\n\r\n\032\032field 0\r\nNum \r\n\032\032field 1\r\nType \r\n\032\032field 2\r\nDisp \r\n\032\032field 3\r\nEnb \r\n\032\032field 4\r\nAddress +\r\n\032\032field 5\r\nWhat\r\n\r\n\032\032breakpoints-table\r\n\r\n\032\032record\r\n\r\n\032\032field 0\r\n1 \r\n\032\032field 1\r\nbreakpoint \r\n\032\032field 2\r\nkeep \r\n\032\032field 3\r\ny \r\n\032\032field 4\r\n$hex +\r\n\032\032field 5\r\nin main at .*${srcfile}:$main_line\r\n\r\n\032\032breakpoints-table-end\r\n$gdb_prompt$" \
+ -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-headers\r\n\r\n\032\032field 0\r\nNum \r\n\032\032field 1\r\nType \r\n\032\032field 2\r\nDisp \r\n\032\032field 3\r\nEnb \r\n\032\032field 4\r\nAddress +\r\n\032\032field 5\r\nWhat\r\n\r\n\032\032breakpoints-table\r\n\r\n\032\032record\r\n\r\n\032\032field 0\r\n1 \r\n\032\032field 1\r\nbreakpoint \r\n\032\032field 2\r\nkeep \r\n\032\032field 3\r\ny \r\n\032\032field 4\r\n$hex +\r\n\032\032field 5\r\nin main at .*${srcfile}:$main_line\r\n\r\n\032\032breakpoints-table-end\r\n$gdb_prompt$" \
{ setup_xfail "*-*-*" 1270
fail "breakpoint info"}
-re ".*$gdb_prompt$" { fail "breakpoint info" }
send_gdb "info break\n"
gdb_expect_list "breakpoint info" "$gdb_prompt$" {
"\r\n\032\032post-prompt\r\n"
- "Num Type Disp Enb Address +What\r\n"
- "1 breakpoint keep y 0x\[0-9a-zA-Z\]+ +in main at .*annota3.c:32\r\n"
+ "Num Type Disp Enb Address +What\r\n"
+ "1 breakpoint keep y 0x\[0-9a-zA-Z\]+ +in main at .*annota3.c:32\r\n"
}
set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1]
gdb_test "info break" \
- "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$main_line.*
\[0-9\]+\[\t \]+breakpoint keep y.* in marker2 at .*$srcfile1:($bp_location8|$bp_location9).*
\[0-9\]+\[\t \]+breakpoint keep y.* in factorial$proto at .*$srcfile:$bp_location7.*
#
# check to see what breakpoints are set (temporary this time)
#
-gdb_test "info break" "Num Type.*Disp Enb Address.*What.*\[\r\n\]
+gdb_test "info break" "Num Type.*Disp Enb Address.*What.*\[\r\n\]
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$main_line.*\[\r\n\]
\[0-9\]+\[\t \]+breakpoint del.*y.*in factorial$proto at .*$srcfile:$bp_location7.*\[\r\n\]
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$bp_location1.*\[\r\n\]
}
gdb_test "info break" \
- "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location6.*
\[0-9\]+\[\t \]+breakpoint keep y.* in marker1$marker1_proto at .*$srcfile1:($bp_location15|$bp_location16).*
\[\t \]+stop only if \\(1==1\\).*
}
gdb_test "info break" \
- "Num Type\[ \]+Disp Enb Address\[ \]+What.*
-\[0-9\]+\[\t \]+breakpoint keep y\\(p\\).*PENDING.*pendfunc1.*" \
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendfunc1.*" \
"single pending breakpoint info"
#
"breakpoint function"
gdb_test "info break" \
- "Num Type\[ \]+Disp Enb Address\[ \]+What.*
-\[0-9\]+\[\t \]+breakpoint keep y\\(p\\).*PENDING.*pendfunc1.*
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendfunc1.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline" \
"pending plus real breakpoint info"
gdb_test "condition 1 k == 1" ""
gdb_test "info break" \
- "Num Type\[ \]+Disp Enb Address\[ \]+What.*
-\[0-9\]+\[\t \]+breakpoint keep y\\(p\\).*PENDING.*pendfunc1.*
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendfunc1.*
\[\t \]+stop only if k == 1.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline" \
"pending plus condition"
gdb_test "disable 1" ""
gdb_test "info break" \
- "Num Type\[ \]+Disp Enb Address\[ \]+What.*
-\[0-9\]+\[\t \]+breakpoint keep n\\(p\\).*PENDING.*pendfunc1.*
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+breakpoint keep n.*PENDING.*pendfunc1.*
\[\t \]+stop only if k == 1.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline" \
"pending disabled"
"Set commands for pending breakpoint"
gdb_test "info break" \
- "Num Type\[ \]+Disp Enb Address\[ \]+What.*
-\[0-9\]+\[\t \]+breakpoint keep n\\(p\\).*PENDING.*pendfunc1.*
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+breakpoint keep n.*PENDING.*pendfunc1.*
\[\t \]+stop only if k == 1.*
\[\t \]+print k.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline" \
}
gdb_test "info break" \
- "Num Type\[ \]+Disp Enb Address\[ \]+What.*
-\[0-9\]+\[\t \]+breakpoint keep n\\(p\\).*PENDING.*pendfunc1.*
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+breakpoint keep n.*PENDING.*pendfunc1.*
\[\t \]+stop only if k == 1.*
\[\t \]+print k.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline.*
-\[0-9\]+\[\t \]+breakpoint keep y\\(p\\).*PENDING.*pendshr.c:$bp2_loc if x > 3.*" \
+\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendshr.c:$bp2_loc if x > 3.*" \
"multiple pending breakpoints"
"set ignore count on pending breakpoint 3"
gdb_test "info break" \
- "Num Type\[ \]+Disp Enb Address\[ \]+What.*
-\[0-9\]+\[\t \]+breakpoint keep n\\(p\\).*PENDING.*pendfunc1.*
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+breakpoint keep n.*PENDING.*pendfunc1.*
\[\t \]+stop only if k == 1.*
\[\t \]+print k.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline.*
-\[0-9\]+\[\t \]+breakpoint keep y\\(p\\).*PENDING.*pendshr.c:$bp2_loc if x > 3.*
-\[0-9\]+\[\t \]+breakpoint keep y\\(p\\).*PENDING.*pendshr.c:$bp3_loc.*ignore next 2 hits.*" \
+\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendshr.c:$bp2_loc if x > 3.*
+\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendshr.c:$bp3_loc.*ignore next 2 hits.*" \
"multiple pending breakpoints 2"
#
rerun_to_main
gdb_test "info break" \
- "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline.*
-\[0-9\]+\[\t \]+breakpoint keep y\\(p\\).*PENDING.*imaginary.*" \
+\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*imaginary.*" \
"verify pending breakpoint after restart"
set bp_location9 [gdb_get_line_number "set breakpoint 9 here"]
gdb_test "info break" \
- "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$main_line.*
\[0-9\]+\[\t \]+breakpoint keep y.* in marker2 at .*$srcfile:($bp_location8|$bp_location9).*
\[0-9\]+\[\t \]+breakpoint keep y.* in factorial at .*$srcfile:$bp_location7.*
#
# check to see what breakpoints are set (temporary this time)
#
-gdb_test "info break" "Num Type.*Disp Enb Address.*What.*\[\r\n\]
+gdb_test "info break" "Num Type.*Disp Enb Address.*What.*\[\r\n\]
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$main_line.*\[\r\n\]
\[0-9\]+\[\t \]+breakpoint del.*y.*in factorial at .*$srcfile:$bp_location7.*\[\r\n\]
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$bp_location1.*\[\r\n\]
}
gdb_test "info break" \
- "Num Type\[ \]+Disp Enb Address\[ \]+What.*
-\[0-9\]+\[\t \]+breakpoint keep y\\(p\\).*PENDING.*shrfunc1.*" \
+ "Num Type\[ \]+Disp Enb Address\[ \]+What.*
+\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*shrfunc1.*" \
"single pending breakpoint info"
set unloadshr_line [gdb_get_line_number "unloadshr break" ${libsrcfile}]
# Verify the breakpoints.
gdb_test "info break" \
- "Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
+ "Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in main at.*$srcfile:49\r
\[\t \]+breakpoint already hit 1 time\r
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(char\\) at.*$srcfile:111\r
}
gdb_test "info break" \
- "Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
+ "Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in main at.*$srcfile:49\r
\[\t \]+breakpoint already hit 1 time\r
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(char\\) at.*$srcfile:111\r
}
gdb_test "info break" \
- "Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
+ "Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(double\\) at.*$srcfile:121\r
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(float\\) at.*$srcfile:120\r
\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r
# Set pending breakpoint via MI
mi_gdb_test "-break-insert -f pendfunc1" \
- ".*\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\\(p\\)\",addr=\"<PENDING>\",pending=\"pendfunc1\",times=\"0\"\}"\
+ ".*\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"<PENDING>\",pending=\"pendfunc1\",times=\"0\"\}"\
"MI pending breakpoint on pendfunc1"
mi_run_cmd