public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/31452] New: [gdb/testsuite] FAIL: gdb.python/py-format-address.exp: symbol_filename=on: gdb.format_address, result should have an offset
@ 2024-03-05 23:37 vries at gcc dot gnu.org
2024-03-05 23:38 ` [Bug testsuite/31452] " vries at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: vries at gcc dot gnu.org @ 2024-03-05 23:37 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31452
Bug ID: 31452
Summary: [gdb/testsuite] FAIL:
gdb.python/py-format-address.exp: symbol_filename=on:
gdb.format_address, result should have an offset
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: testsuite
Assignee: unassigned at sourceware dot org
Reporter: vries at gcc dot gnu.org
Target Milestone: ---
On arm-linux, I ran into:
...
(gdb) python print("Got: " + gdb.format_address(0x103dd))^M
Got: 0x103dd <main at
/home/vries/gdb/src/gdb/testsuite/gdb.python/py-format-address.c:30>^M
(gdb) FAIL: gdb.python/py-format-address.exp: symbol_filename=on:
gdb.format_address, result should have an offset
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug testsuite/31452] [gdb/testsuite] FAIL: gdb.python/py-format-address.exp: symbol_filename=on: gdb.format_address, result should have an offset
2024-03-05 23:37 [Bug testsuite/31452] New: [gdb/testsuite] FAIL: gdb.python/py-format-address.exp: symbol_filename=on: gdb.format_address, result should have an offset vries at gcc dot gnu.org
@ 2024-03-05 23:38 ` vries at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: vries at gcc dot gnu.org @ 2024-03-05 23:38 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31452
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Tentative patch:
...
diff --git a/gdb/testsuite/gdb.python/py-format-address.c
b/gdb/testsuite/gdb.python/py-format-address.c
index 2a0e9163db5..626bb41a220 100644
--- a/gdb/testsuite/gdb.python/py-format-address.c
+++ b/gdb/testsuite/gdb.python/py-format-address.c
@@ -28,5 +28,6 @@ FUNCTION_NAME (void)
int
main (void)
{
- return FUNCTION_NAME ();
+ int res = 0;
+ return res + FUNCTION_NAME ();
}
diff --git a/gdb/testsuite/gdb.python/py-format-address.exp
b/gdb/testsuite/gdb.python/py-format-address.exp
index 8e7cf47e03a..0fd1e63b13f 100644
--- a/gdb/testsuite/gdb.python/py-format-address.exp
+++ b/gdb/testsuite/gdb.python/py-format-address.exp
@@ -40,7 +40,9 @@ if ![runto_main] {
# for the program space and architecture (these will be selected based
# on the current inferior).
set main_addr [get_hexadecimal_valueof "&main" "UNKNOWN"]
-set next_addr [format 0x%x [expr $main_addr + 1]]
+
+gdb_test "next" "$decimal\[ \t\]+return .*"
+set next_addr [get_hexadecimal_valueof {$pc} "UNKNOWN"]
foreach_with_prefix symbol_filename { on off } {
gdb_test_no_output "set print symbol-filename ${symbol_filename}"
@@ -56,7 +58,7 @@ foreach_with_prefix symbol_filename { on off } {
"gdb.format_address, result should have no offset"
gdb_test "python print(\"Got: \" + gdb.format_address($next_addr))" \
- "Got: $next_addr <main\\+1${filename_pattern}>" \
+ "Got: $next_addr <main\\+$decimal${filename_pattern}>" \
"gdb.format_address, result should have an offset"
}
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-05 23:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-05 23:37 [Bug testsuite/31452] New: [gdb/testsuite] FAIL: gdb.python/py-format-address.exp: symbol_filename=on: gdb.format_address, result should have an offset vries at gcc dot gnu.org
2024-03-05 23:38 ` [Bug testsuite/31452] " vries at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).