* 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 <msnyder@redhat.com>
+
+ * 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 <msnyder@redhat.com>
* thread-db.c (check_thread_signals): When looping over all
signals, ignore signal zero.
/* 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:
#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;
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 */
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");
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"
}
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" "" ""
}
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" "" ""
# 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)
# 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" \
"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" \
"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
"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
"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" \
"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 <FIXME test number> passcount for "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" \
"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
"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)
"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
# 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
"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\""
{
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)
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)