From: Michael Snyder Date: Tue, 17 Apr 2001 20:16:31 +0000 (+0000) Subject: 2001-04-17 Michael Snyder X-Git-Tag: dberlin-typesystem-branchpoint~742 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=75ac9d7b9d5075b6bf9b0cbbcd9749241ba84697;p=platform%2Fupstream%2Fbinutils.git 2001-04-17 Michael Snyder * breakpoint.c (print_one_breakpoint): Handle 64-bit addresses. * tracepoint.c (tracepoints_info): Handle 64-bit addresses. * testsuite/gdb.trace/deltrace.exp: Allow for 64-bit addresses. * testsuite/gdb.trace/infotrace.exp: Ditto. * testsuite/gdb.trace/passcount.exp: Ditto. * testsuite/gdb.trace/while-stepping.exp: Ditto. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d5d4d49..3dfb98e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,4 +1,13 @@ 2001-04-17 Michael Snyder + + * breakpoint.c (print_one_breakpoint): Handle 64-bit addresses. + * tracepoint.c (tracepoints_info): Handle 64-bit addresses. + * testsuite/gdb.trace/deltrace.exp: Allow for 64-bit addresses. + * testsuite/gdb.trace/infotrace.exp: Ditto. + * testsuite/gdb.trace/passcount.exp: Ditto. + * testsuite/gdb.trace/while-stepping.exp: Ditto. + +2001-04-17 Michael Snyder * thread-db.c (check_thread_signals): When looping over all signals, ignore signal zero. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 3121d9b..2d18f9d 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -3148,7 +3148,12 @@ print_one_breakpoint (struct breakpoint *b, /* 5 and 6 */ strcpy (wrap_indent, " "); if (addressprint) - strcat (wrap_indent, " "); + { + if (TARGET_ADDR_BIT <= 32) + strcat (wrap_indent, " "); + else + strcat (wrap_indent, " "); + } switch (b->type) { case bp_none: @@ -3322,12 +3327,18 @@ print_one_breakpoint (struct breakpoint *b, #else if (addressprint) { + char *tmp; + annotate_field (4); - /* FIXME-32x64: need a print_address_numeric with - field width */ - printf_filtered ("%s ", - local_hex_string_custom - ((unsigned long) b->address, "08l")); + + if (TARGET_ADDR_BIT <= 32) + tmp = longest_local_hex_string_custom (b->address + & (CORE_ADDR) 0xffffffff, + "08l"); + else + tmp = longest_local_hex_string_custom (b->address, "016l"); + + printf_filtered ("%s ", tmp); } annotate_field (5); *last_addr = b->address; @@ -3562,7 +3573,10 @@ breakpoint_1 (int bnum, int allflag) if (addressprint) { annotate_field (4); - ui_out_table_header (uiout, 10, ui_left, "Address"); /* 5 */ + if (TARGET_ADDR_BIT <= 32) + ui_out_table_header (uiout, 10, ui_left, "Address"); /* 5 */ + else + ui_out_table_header (uiout, 18, ui_left, "Address"); /* 5 */ } annotate_field (5); ui_out_table_header (uiout, 40, ui_noalign, "What"); /* 6 */ @@ -3579,7 +3593,10 @@ breakpoint_1 (int bnum, int allflag) if (addressprint) { annotate_field (4); - printf_filtered ("Address "); + if (TARGET_ADDR_BIT <= 32) + printf_filtered ("Address "); + else + printf_filtered ("Address "); } annotate_field (5); printf_filtered ("What\n"); diff --git a/gdb/testsuite/gdb.trace/deltrace.exp b/gdb/testsuite/gdb.trace/deltrace.exp index de0cbf9..58a69ba 100644 --- a/gdb/testsuite/gdb.trace/deltrace.exp +++ b/gdb/testsuite/gdb.trace/deltrace.exp @@ -70,7 +70,7 @@ gdb_test "trace gdb_asm_test" "Tracepoint \[0-9\]+ at .*" "set tracepoint 2" gdb_test "trace $testline1" "Tracepoint \[0-9\]+ at .*" "set tracepoint 3" gdb_test "info tracepoints" \ - "Num Enb Address PassC StepC What.*\[0-9\]+\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*in gdb_c_test.*\[0-9\]+\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*gdb_asm_test.*\[0-9\]+\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*in gdb_recursion_test.*" \ + "Num Enb Address\[ \]+PassC StepC What.*\[0-9\]+\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*in gdb_c_test.*\[0-9\]+\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*gdb_asm_test.*\[0-9\]+\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*in gdb_recursion_test.*" \ "3.1a: set three tracepoints" send_gdb "delete tracepoints\n" @@ -101,7 +101,7 @@ if { $trcpt1 <= 0 || $trcpt2 <= 0 || $trcpt3 <= 0 } then { } gdb_test "info tracepoints" \ - "Num Enb Address PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*in.*gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*in.*gdb_recursion_test.*" \ + "Num Enb Address\[ \]+PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*in.*gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*in.*gdb_recursion_test.*" \ "3.2a: set three tracepoints" #gdb_test "delete tracepoint $trcpt1" "" "" @@ -215,7 +215,7 @@ if { $trcpt1 <= 0 || $trcpt2 <= 0 || $trcpt3 <= 0 } then { } gdb_test "info tracepoints" \ - "Num Enb Address PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*in gdb_recursion_test.*" \ + "Num Enb Address\[ \]+PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*in gdb_recursion_test.*" \ "3.3a: set three tracepoints" #gdb_test "delete tracepoint $trcpt1 $trcpt2 $trcpt3" "" "" diff --git a/gdb/testsuite/gdb.trace/infotrace.exp b/gdb/testsuite/gdb.trace/infotrace.exp index 4eb3d83..6a117d3 100644 --- a/gdb/testsuite/gdb.trace/infotrace.exp +++ b/gdb/testsuite/gdb.trace/infotrace.exp @@ -64,7 +64,7 @@ if { $c_test_num <= 0 || $asm_test_num <= 0 } then { # 2.1 info tracepoints (all) gdb_test "info tracepoints" \ - "Num Enb Address PassC StepC What.*$c_test_num\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*in gdb_c_test.*$asm_test_num\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*gdb_asm_test.*" \ + "Num Enb Address\[ \]+PassC StepC What.*$c_test_num\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*in gdb_c_test.*$asm_test_num\[\t \]+y\[\t \]+0x\[0-9a-fA-F\]+.*gdb_asm_test.*" \ "2.1: info tracepoints (all)" # 2.2 info tracepoint (specific) diff --git a/gdb/testsuite/gdb.trace/passcount.exp b/gdb/testsuite/gdb.trace/passcount.exp index ac73b3a..1777693 100644 --- a/gdb/testsuite/gdb.trace/passcount.exp +++ b/gdb/testsuite/gdb.trace/passcount.exp @@ -75,7 +75,7 @@ if { $trcpt1 <= 0 || $trcpt2 <= 0 || $trcpt3 <= 0 } then { # 4.1 passcount of specified tracepoint gdb_test "info tracepoints" \ - "Num Enb Address PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+$hex\[\t \]+0\[\t \]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+$hex\[\t \]+0\[\t \]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+$hex\[\t \]+0\[\t \]+.*in gdb_recursion_test.*" \ + "Num Enb Address\[ \]+PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+$hex\[\t \]+0\[\t \]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+$hex\[\t \]+0\[\t \]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+$hex\[\t \]+0\[\t \]+.*in gdb_recursion_test.*" \ "4.1a: set three tracepoints, passcounts all zero" gdb_test "passcount 2 $trcpt1" \ @@ -83,7 +83,7 @@ gdb_test "passcount 2 $trcpt1" \ "4.1b: set 1st tracepoint's passcount to two" gdb_test "info tracepoints" \ - "Num Enb Address PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+$hex\[\t \]+2\[\t \]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+$hex\[\t \]+0\[\t \]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+$hex\[\t \]+0\[\t \]+.*in gdb_recursion_test.*" \ + "Num Enb Address\[ \]+PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+$hex\[\t \]+2\[\t \]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+$hex\[\t \]+0\[\t \]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+$hex\[\t \]+0\[\t \]+.*in gdb_recursion_test.*" \ "4.1c: verify 1st tracepoint's passcount set to two" gdb_test "passcount 4 $trcpt2" \ @@ -91,7 +91,7 @@ gdb_test "passcount 4 $trcpt2" \ "4.1d: set 2nd tracepoint's passcount to four" gdb_test "info tracepoints" \ - "Num Enb Address PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+$hex\[\t \]+2\[\t \]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+$hex\[\t \]+4\[\t \]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+$hex\[\t \]+0\[\t \]+.*in gdb_recursion_test.*" \ + "Num Enb Address\[ \]+PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+$hex\[\t \]+2\[\t \]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+$hex\[\t \]+4\[\t \]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+$hex\[\t \]+0\[\t \]+.*in gdb_recursion_test.*" \ "4.1c: verify 2nd tracepoint's passcount set to four" # 4.2 passcount of last (default) tracepoint @@ -101,7 +101,7 @@ gdb_test "passcount 6" \ "4.2b: set last (default) tp's passcount to six" gdb_test "info tracepoints" \ - "Num Enb Address PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+$hex\[\t \]+2\[\t \]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+$hex\[\t \]+4\[\t \]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+$hex\[\t \]+6\[\t \]+.*in gdb_recursion_test.*" \ + "Num Enb Address\[ \]+PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+$hex\[\t \]+2\[\t \]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+$hex\[\t \]+4\[\t \]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+$hex\[\t \]+6\[\t \]+.*in gdb_recursion_test.*" \ "4.2b: verify last (default) tp's passcount set to six" # 4.3 run until stopped explicitly by user @@ -114,7 +114,7 @@ gdb_test "passcount 7" \ "4.4a: reset last (default) tp's passcount to seven" gdb_test "info tracepoints" \ - "Num Enb Address PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+$hex\[\t \]+2\[\t \]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+$hex\[\t \]+4\[\t \]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+$hex\[\t \]+7\[\t \]+.*in gdb_recursion_test.*" \ + "Num Enb Address\[ \]+PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+$hex\[\t \]+2\[\t \]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+$hex\[\t \]+4\[\t \]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+$hex\[\t \]+7\[\t \]+.*in gdb_recursion_test.*" \ "4.4a: verify reset last (default) tp's passcount to seven" gdb_test "passcount 5 $trcpt2" \ @@ -122,7 +122,7 @@ gdb_test "passcount 5 $trcpt2" \ "4.4b: reset second tracepoint's passcount to five" gdb_test "info tracepoints" \ - "Num Enb Address PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+$hex\[\t \]+2\[\t \]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+$hex\[\t \]+5\[\t \]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+$hex\[\t \]+7\[\t \]+.*in gdb_recursion_test.*" \ + "Num Enb Address\[ \]+PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+$hex\[\t \]+2\[\t \]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+$hex\[\t \]+5\[\t \]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+$hex\[\t \]+7\[\t \]+.*in gdb_recursion_test.*" \ "4.4c: verify reset second tracepoint's passcount to five" # 4.20 passcount for "all" @@ -132,7 +132,7 @@ gdb_test "passcount 3 all" \ "4.20a: set all three passcounts to three" gdb_test "info tracepoints" \ - "Num Enb Address PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+$hex\[\t \]+3\[\t \]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+$hex\[\t \]+3\[\t \]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+$hex\[\t \]+3\[\t \]+.*in gdb_recursion_test.*" \ + "Num Enb Address\[ \]+PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+$hex\[\t \]+3\[\t \]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+$hex\[\t \]+3\[\t \]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+$hex\[\t \]+3\[\t \]+.*in gdb_recursion_test.*" \ "4.20a: set all three passcounts to three" gdb_test "passcount 4 all" \ @@ -140,7 +140,7 @@ gdb_test "passcount 4 all" \ "4.20a: reset all three passcounts to four" gdb_test "info tracepoints" \ - "Num Enb Address PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+$hex\[\t \]+4\[\t \]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+$hex\[\t \]+4\[\t \]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+$hex\[\t \]+4\[\t \]+.*in gdb_recursion_test.*" \ + "Num Enb Address\[ \]+PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+$hex\[\t \]+4\[\t \]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+$hex\[\t \]+4\[\t \]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+$hex\[\t \]+4\[\t \]+.*in gdb_recursion_test.*" \ "4.20b: reset all three passcounts to four" # 4.5 Verify trace stops on first "satisfied" passcount @@ -153,7 +153,7 @@ gdb_test "passcount 0 $trcpt1" \ "4.6: set passcount to zero" gdb_test "info tracepoints" \ - "Num Enb Address PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+$hex\[\t \]+0\[\t \]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+$hex\[\t \]+4\[\t \]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+$hex\[\t \]+4\[\t \]+.*in gdb_recursion_test.*" \ + "Num Enb Address\[ \]+PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+$hex\[\t \]+0\[\t \]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+$hex\[\t \]+4\[\t \]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+$hex\[\t \]+4\[\t \]+.*in gdb_recursion_test.*" \ "4.6: set passcount to zero" # 4.7 (test a very large passcount) @@ -163,7 +163,7 @@ gdb_test "passcount 32767 $trcpt1" \ "4.7: set passcount to large number (32767)" gdb_test "info tracepoints" \ - "Num Enb Address PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+$hex\[\t \]+32767\[\t \]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+$hex\[\t \]+4\[\t \]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+$hex\[\t \]+4\[\t \]+.*in gdb_recursion_test.*" \ + "Num Enb Address\[ \]+PassC StepC What.*$trcpt1\[\t \]+y\[\t \]+$hex\[\t \]+32767\[\t \]+.*in gdb_c_test.*$trcpt2\[\t \]+y\[\t \]+$hex\[\t \]+4\[\t \]+.*gdb_asm_test.*$trcpt3\[\t \]+y\[\t \]+$hex\[\t \]+4\[\t \]+.*in gdb_recursion_test.*" \ "4.7: set passcount to large number (32767)" # 4.8 set passcount for invalid tracepoint diff --git a/gdb/testsuite/gdb.trace/while-stepping.exp b/gdb/testsuite/gdb.trace/while-stepping.exp index 7a0a41f..4c87d5c 100644 --- a/gdb/testsuite/gdb.trace/while-stepping.exp +++ b/gdb/testsuite/gdb.trace/while-stepping.exp @@ -64,7 +64,7 @@ if { $trcpt1 <= 0 } then { # 5.12 basic while-stepping command (collect regs) gdb_test "info tracepoints" \ - "Num Enb Address PassC StepC What.*$trcpt1.*0x.*\[\t \]+\[0-9\]+\[\t \]+0\[\t \]+.*in gdb_c_test.*" \ + "Num Enb Address\[ \]+PassC StepC What.*$trcpt1.*0x.*\[\t \]+\[0-9\]+\[\t \]+0\[\t \]+.*in gdb_c_test.*" \ "5.12: set a tracepoint, stepcount is zero" set stepcount 12 @@ -76,11 +76,11 @@ gdb_trace_setactions "5.12: set stepcount to $stepcount" \ "end" "" gdb_test "info tracepoints" \ - "Num Enb Address PassC StepC What.*$trcpt1.*0x.*\[\t \]+\[0-9\]+\[\t \]+$stepcount\[\t \]+.*in gdb_c_test.*" \ + "Num Enb Address\[ \]+PassC StepC What.*$trcpt1.*0x.*\[\t \]+\[0-9\]+\[\t \]+$stepcount\[\t \]+.*in gdb_c_test.*" \ "5.12: confirm stepcount set to $stepcount" gdb_test "info tracepoints" \ - "Num Enb Address PassC StepC What.* + "Num Enb Address\[ \]+PassC StepC What.* .*while-stepping $stepcount.*" \ "5.12: info trace shows \"while-stepping\"" diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 888f54d..41d2062 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -478,19 +478,38 @@ tracepoints_info (char *tpnum_exp, int from_tty) { printf_filtered ("Num Enb "); if (addressprint) - printf_filtered ("Address "); + { + if (TARGET_ADDR_BIT <= 32) + printf_filtered ("Address "); + else + printf_filtered ("Address "); + } printf_filtered ("PassC StepC What\n"); } strcpy (wrap_indent, " "); if (addressprint) - strcat (wrap_indent, " "); + { + if (TARGET_ADDR_BIT <= 32) + strcat (wrap_indent, " "); + else + strcat (wrap_indent, " "); + } printf_filtered ("%-3d %-3s ", t->number, t->enabled == enabled ? "y" : "n"); if (addressprint) - printf_filtered ("%s ", - local_hex_string_custom ((unsigned long) t->address, - "08l")); + { + char *tmp; + + if (TARGET_ADDR_BIT <= 32) + tmp = longest_local_hex_string_custom (t->address + & (CORE_ADDR) 0xffffffff, + "08l"); + else + tmp = longest_local_hex_string_custom (t->address, "016l"); + + printf_filtered ("%s ", tmp); + } printf_filtered ("%-5d %-5ld ", t->pass_count, t->step_count); if (t->source_file) @@ -1542,7 +1561,8 @@ encode_actions (struct tracepoint *t, char ***tdp_actions, struct cleanup *old_chain1 = NULL; struct agent_reqs areqs; - exp = parse_exp_1 (&action_exp, block_for_pc (t->address), 1); + exp = parse_exp_1 (&action_exp, + block_for_pc (t->address), 1); old_chain = make_cleanup (free_current_contents, &exp); switch (exp->elts[0].opcode)