From: Tom de Vries <tdevries@suse.de>
To: Andrew Burgess <aburgess@redhat.com>, Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCHv2 3/3] gdb/python: add Corefile.mapped_files method
Date: Tue, 7 Oct 2025 17:43:41 +0200 [thread overview]
Message-ID: <3996ddc9-2cb4-4ead-8895-5d6b27b5a72c@suse.de> (raw)
In-Reply-To: <87jz166al5.fsf@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 627 bytes --]
On 10/7/25 16:38, Andrew Burgess wrote:
> Andrew Burgess <aburgess@redhat.com> writes:
>
>>
>> Thanks for the diagnostic help. I'll work on improving the test to try
>> and catch these cases. If that works, then we might be able to adopt
>> this to help with other tests. Keeping this in mind, I'll add helper
>> functions to lib/gdb.exp.
>
> Hi Tom,
>
> At your leisure, could you check that the patch below resolves the FAIL
> you reported please.
>
Hi Andrew,
on Leap 15.6, yes.
On Tumbleweed, unfortunately no.
I've attached the gdb.log here, in case you're curious. I'll take a
look tomorrow.
Thanks,
- Tom
[-- Attachment #2: gdb.log --]
[-- Type: text/x-log, Size: 27184 bytes --]
Test run by root on Tue Oct 7 15:34:58 2025
Native configuration is x86_64-pc-linux-gnu
=== gdb tests ===
Schedule of variations:
unix
Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using /data/vries/gdb/src/gdb/testsuite/config/unix.exp as tool-and-target-specific interface file.
Running /data/vries/gdb/src/gdb/testsuite/gdb.python/py-corefile.exp ...
Executing on build: rm -rf /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile (timeout = 300)
builtin_spawn -ignore SIGHUP rm -rf /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile
gdb_do_cache: allow_python_tests ( )
Executing on host: /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/../../gdb/gdb -nw -nx -q -iex "set height 0" -iex "set width 0" -data-directory /data/vries/gdb/tumbleweed-20251005/build/gdb/data-directory -iex "set interactive-mode on" --configuration (timeout = 300)
builtin_spawn -ignore SIGHUP /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/../../gdb/gdb -nw -nx -q -iex set height 0 -iex set width 0 -data-directory /data/vries/gdb/tumbleweed-20251005/build/gdb/data-directory -iex set interactive-mode on --configuration
This GDB was configured as follows:
configure --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--enable-targets=all
--with-auto-load-dir=$debugdir:$datadir/auto-load
--with-auto-load-safe-path=$debugdir:$datadir/auto-load
--with-expat
--with-gdb-datadir=/data/vries/gdb/tumbleweed-20251005/install/share/gdb (relocatable)
--with-jit-reader-dir=/data/vries/gdb/tumbleweed-20251005/install/lib/gdb (relocatable)
--without-libunwind-ia64
--with-lzma
--without-babeltrace
--without-intel-pt
--with-xxhash
--with-python=/usr
--with-python-libdir=/usr/lib
--with-debuginfod
--with-curses
--without-guile
--without-amd-dbgapi
--enable-source-highlight
--enable-threading
--enable-tui
--without-system-readline
--with-separate-debug-dir=/usr/lib/debug
--with-system-gdbinit=/data/vries/gdb/system-gdbinit
("Relocatable" means the directory can be moved with the GDB installation
tree, and GDB will still find it.)
GNU Readline library version: 8.2 (internal)
gdb_do_cache: universal_compile_options_c ( )
Executing on host: gcc -fdiagnostics-color=never -c -o /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/temp/25044/ccopts.o /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/temp/25044/ccopts.c (timeout = 300)
builtin_spawn -ignore SIGHUP gcc -fdiagnostics-color=never -c -o /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/temp/25044/ccopts.o /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/temp/25044/ccopts.c
gdb_do_cache: get_compiler_info_1 ( c )
get_compiler_info: gcc-15-2-0
gdb_do_cache: get_compiler_info_1 ( c )
gdb_do_cache: get_compiler_info_1 ( c )
gdb_do_cache: get_compiler_info_1 ( c )
gdb_do_cache: get_compiler_info_1 ( c )
gdb_do_cache: get_compiler_info_1 ( c )
gdb_do_cache: get_compiler_info_1 ( c )
gdb_do_cache: get_compiler_info_1 ( c )
gdb_do_cache: get_compiler_info_1 ( c )
Executing on host: gcc -fno-stack-protector -fdiagnostics-color=never -c -g -o /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile0.o /data/vries/gdb/src/gdb/testsuite/gdb.python/py-corefile.c (timeout = 300)
builtin_spawn -ignore SIGHUP gcc -fno-stack-protector -fdiagnostics-color=never -c -g -o /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile0.o /data/vries/gdb/src/gdb/testsuite/gdb.python/py-corefile.c
gdb_do_cache: universal_compile_options_c ( )
gdb_do_cache: get_compiler_info_1 ( c )
gdb_do_cache: get_compiler_info_1 ( c )
gdb_do_cache: get_compiler_info_1 ( c )
gdb_do_cache: get_compiler_info_1 ( c )
gdb_do_cache: get_compiler_info_1 ( c )
gdb_do_cache: get_compiler_info_1 ( c )
gdb_do_cache: get_compiler_info_1 ( c )
gdb_do_cache: get_compiler_info_1 ( c )
gdb_do_cache: get_compiler_info_1 ( c )
Executing on host: gcc -fno-stack-protector /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile0.o -fdiagnostics-color=never -g -lm -o /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile (timeout = 300)
builtin_spawn -ignore SIGHUP gcc -fno-stack-protector /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile0.o -fdiagnostics-color=never -g -lm -o /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile
Executing on build: mv /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/coredir.25044/core.py-corefile.25114.6a709f42a6b1.1759851299 /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile.core (timeout = 300)
builtin_spawn -ignore SIGHUP mv /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/coredir.25044/core.py-corefile.25114.6a709f42a6b1.1759851299 /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile.core
Executing on build: rmdir /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/coredir.25044 (timeout = 300)
builtin_spawn -ignore SIGHUP rmdir /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/coredir.25044
Executing on build: cp /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile.core /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile-other.core (timeout = 300)
builtin_spawn -ignore SIGHUP cp /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile.core /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile-other.core
Starting logfile: /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/gdb.in.1
builtin_spawn /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/../../gdb/gdb -nw -nx -q -iex set height 0 -iex set width 0 -data-directory /data/vries/gdb/tumbleweed-20251005/build/gdb/data-directory -iex set interactive-mode on
(gdb) set height 0
(gdb) set width 0
(gdb) dir
Reinitialize source path to empty? (y or n) y
Source directories searched: $cdir:$cwd
(gdb) dir /data/vries/gdb/binutils-gdb.git/gdb/testsuite/gdb.python
Source directories searched: /data/vries/gdb/binutils-gdb.git/gdb/testsuite/gdb.python:$cdir:$cwd
(gdb) python inf = gdb.selected_inferior()
(gdb) PASS: gdb.python/py-corefile.exp: capture current inferior
python print(inf.corefile)
None
(gdb) PASS: gdb.python/py-corefile.exp: Inferior.corefile is None before loading a core file
core-file /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile.core
[New LWP 25114]
Reading symbols from /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile...
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile'.
Program terminated with signal SIGABRT, Aborted.
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
warning: 44 pthread_kill.c: No such file or directory
(gdb) PASS: gdb.python/py-corefile.exp: load core file
python print(inf.corefile)
<gdb.Corefile inferior=1 filename='/data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile.core'>
(gdb) PASS: gdb.python/py-corefile.exp: Inferior.corefile is a valid object after loading a core file
python core1=inf.corefile
(gdb) PASS: gdb.python/py-corefile.exp: capture gdb.Corefile object
python print(core1.__dict__)
{}
(gdb) PASS: gdb.python/py-corefile.exp: print Corefile.__dict__ when empty
python core1._my_attribute = "Hello"
(gdb) PASS: gdb.python/py-corefile.exp: write new attribute into Corefile object
python print(core1._my_attribute)
Hello
(gdb) PASS: gdb.python/py-corefile.exp: immediately read new attribute
python print(core1.__dict__)
{'_my_attribute': 'Hello'}
(gdb) PASS: gdb.python/py-corefile.exp: print Corefile.__dict__ after adding an attribute
python print(core1.filename)
/data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile.core
(gdb) PASS: gdb.python/py-corefile.exp: Corefile.filename attribute works as expected
python print(core1.is_valid())
True
(gdb) PASS: gdb.python/py-corefile.exp: Corefile.is_valid() is True while corefile is loaded
core-file
No core file now.
(gdb) PASS: gdb.python/py-corefile.exp: unload current core file
python print(core1.is_valid())
False
(gdb) PASS: gdb.python/py-corefile.exp: Corefile.is_valid() is False after corefile is unloaded
python print(core1.__dict__)
{'_my_attribute': 'Hello'}
(gdb) PASS: gdb.python/py-corefile.exp: print Corefile.__dict__ with attribute when invalid
python print(core1)
<gdb.Corefile (invalid)>
(gdb) PASS: gdb.python/py-corefile.exp: print an invalid gdb.Corefile object
python print(core1.filename)
Python Exception <class 'RuntimeError'>: Corefile no longer exists.
Error occurred in Python: Corefile no longer exists.
(gdb) PASS: gdb.python/py-corefile.exp: error when reading filename from invalid Corefile
python print(inf.corefile)
None
(gdb) PASS: gdb.python/py-corefile.exp: Inferior.corefile is None again after corefile unload
python print(core1._my_attribute)
Hello
(gdb) PASS: gdb.python/py-corefile.exp: read new attribute from invalid core file
add-inferior
[New inferior 2]
Added inferior 2
(gdb) PASS: gdb.python/py-corefile.exp: add-inferior
inferior 2
[Switching to inferior 2 [<null>] (<noexec>)]
(gdb) PASS: gdb.python/py-corefile.exp: inferior 2
core-file /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile.core
[New LWP 25114]
Reading symbols from /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile...
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile'.
Program terminated with signal SIGABRT, Aborted.
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
warning: 44 pthread_kill.c: No such file or directory
(gdb) PASS: gdb.python/py-corefile.exp: in second inferior: load core file
python print(inf.corefile)
None
(gdb) PASS: gdb.python/py-corefile.exp: in second inferior: first inferior still has no core file
python core2=gdb.selected_inferior().corefile
(gdb) PASS: gdb.python/py-corefile.exp: in second inferior: capture gdb.Corefile object
python print(core2._my_attribute)
Python Exception <class 'AttributeError'>: 'gdb.Corefile' object has no attribute '_my_attribute'
Error occurred in Python: 'gdb.Corefile' object has no attribute '_my_attribute'
(gdb) PASS: gdb.python/py-corefile.exp: in second inferior: try to read attribute that doesn't exist
python print(core2.filename)
/data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile.core
(gdb) PASS: gdb.python/py-corefile.exp: in second inferior: Corefile.filename attribute works as expected
inferior 1
[Switching to inferior 1 [<null>] (/data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile)]
(gdb) PASS: gdb.python/py-corefile.exp: in second inferior: inferior 1
python print(core2.filename)
/data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile.core
(gdb) PASS: gdb.python/py-corefile.exp: Corefile.filename attribute works from different progspace
core /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile-other.core
[New LWP 25114]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile'.
Program terminated with signal SIGABRT, Aborted.
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
warning: 44 pthread_kill.c: No such file or directory
(gdb) PASS: gdb.python/py-corefile.exp: load other corefile into inferior 1
inferior 2
[Switching to inferior 2 [process 25114] (/data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile)]
[Switching to thread 2.1 (Thread 0x7ff03939a380 (LWP 25114))]
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
warning: 44 pthread_kill.c: No such file or directory
(gdb) PASS: gdb.python/py-corefile.exp: remove second inferior: inferior 2
python print(inf.corefile.filename)
/data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile-other.core
(gdb) PASS: gdb.python/py-corefile.exp: remove second inferior: read inferior 1 corefile when in inferior 2
python core1=inf.corefile
(gdb) PASS: gdb.python/py-corefile.exp: remove second inferior: capture inferior 1 gdb.Corefile while in inferior 2
python print(core1._my_attribute)
Python Exception <class 'AttributeError'>: 'gdb.Corefile' object has no attribute '_my_attribute'
Error occurred in Python: 'gdb.Corefile' object has no attribute '_my_attribute'
(gdb) PASS: gdb.python/py-corefile.exp: remove second inferior: try to read attribute that doesn't exist
core-file
No core file now.
(gdb) PASS: gdb.python/py-corefile.exp: remove second inferior: core-file
python print(core2.filename)
Python Exception <class 'RuntimeError'>: Corefile no longer exists.
Error occurred in Python: Corefile no longer exists.
(gdb) PASS: gdb.python/py-corefile.exp: remove second inferior: error when reading filename from invalid Corefile
inferior 1
[Switching to inferior 1 [process 25114] (/data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile)]
[Switching to thread 1.1 (Thread 0x7ff03939a380 (LWP 25114))]
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
warning: 44 pthread_kill.c: No such file or directory
(gdb) PASS: gdb.python/py-corefile.exp: remove second inferior: inferior 1
remove-inferiors 2
(gdb) PASS: gdb.python/py-corefile.exp: remove second inferior: remove-inferiors 2
python print(core2.is_valid())
False
(gdb) PASS: gdb.python/py-corefile.exp: remove second inferior: Corefile.is_valid() is False after corefile is unloaded, and Progspace is deleted
python print(core2.filename)
Python Exception <class 'RuntimeError'>: Corefile no longer exists.
Error occurred in Python: Corefile no longer exists.
(gdb) PASS: gdb.python/py-corefile.exp: remove second inferior: error when reading filename of an invalid Corefile, from deleted program space
python print(core1.is_valid())
True
(gdb) PASS: gdb.python/py-corefile.exp: remove second inferior: check inferior 1 core file is still valid
Starting logfile: /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/gdb.in.2
builtin_spawn /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/../../gdb/gdb -nw -nx -q -iex set height 0 -iex set width 0 -data-directory /data/vries/gdb/tumbleweed-20251005/build/gdb/data-directory -iex set interactive-mode on
(gdb) set height 0
(gdb) set width 0
(gdb) dir
Reinitialize source path to empty? (y or n) y
Source directories searched: $cdir:$cwd
(gdb) dir /data/vries/gdb/binutils-gdb.git/gdb/testsuite/gdb.python
Source directories searched: /data/vries/gdb/binutils-gdb.git/gdb/testsuite/gdb.python:$cdir:$cwd
(gdb) source /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile.py
Success
(gdb) PASS: gdb.python/py-corefile.exp: test mapped files data: source python script
core-file /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile.core
[New LWP 25114]
Reading symbols from /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile...
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile'.
Program terminated with signal SIGABRT, Aborted.
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
warning: 44 pthread_kill.c: No such file or directory
(gdb) PASS: gdb.python/py-corefile.exp: test mapped files data: load core file
pipe info proc mappings | tee /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile-out-1.txt
Mapped address spaces:
Start Addr End Addr Size Offset File
0x0000000000400000 0x0000000000401000 0x1000 0x0 /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile
0x0000000000401000 0x0000000000402000 0x1000 0x1000 /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile
0x0000000000402000 0x0000000000403000 0x1000 0x2000 /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile
0x0000000000403000 0x0000000000404000 0x1000 0x2000 /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile
0x0000000000404000 0x0000000000405000 0x1000 0x3000 /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile
0x00007ff03939b000 0x00007ff0393c3000 0x28000 0x0 /usr/lib64/libc.so.6
0x00007ff0393c3000 0x00007ff03953b000 0x178000 0x28000 /usr/lib64/libc.so.6
0x00007ff03953b000 0x00007ff03958e000 0x53000 0x1a0000 /usr/lib64/libc.so.6
0x00007ff03958e000 0x00007ff039592000 0x4000 0x1f2000 /usr/lib64/libc.so.6
0x00007ff039592000 0x00007ff03959b000 0x9000 0x1f6000 /usr/lib64/libc.so.6
0x00007ff0395a3000 0x00007ff0395b4000 0x11000 0x0 /usr/lib64/libm.so.6
0x00007ff0395b4000 0x00007ff03963b000 0x87000 0x11000 /usr/lib64/libm.so.6
0x00007ff03963b000 0x00007ff03969b000 0x60000 0x98000 /usr/lib64/libm.so.6
0x00007ff03969b000 0x00007ff03969c000 0x1000 0xf7000 /usr/lib64/libm.so.6
0x00007ff03969c000 0x00007ff03969e000 0x2000 0xf8000 /usr/lib64/libm.so.6
0x00007ff0396a8000 0x00007ff0396a9000 0x1000 0x0 /usr/lib64/ld-linux-x86-64.so.2
0x00007ff0396a9000 0x00007ff0396d4000 0x2b000 0x1000 /usr/lib64/ld-linux-x86-64.so.2
0x00007ff0396d4000 0x00007ff0396df000 0xb000 0x2c000 /usr/lib64/ld-linux-x86-64.so.2
0x00007ff0396df000 0x00007ff0396e1000 0x2000 0x37000 /usr/lib64/ld-linux-x86-64.so.2
0x00007ff0396e1000 0x00007ff0396e3000 0x2000 0x39000 /usr/lib64/ld-linux-x86-64.so.2
(gdb) PASS: gdb.python/py-corefile.exp: test mapped files data: capture built-in mappings output
pipe info proc py-mappings | tee /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile-out-2.txt
Mapped address spaces:
Start Addr End Addr Size Offset File
0x0000000000400000 0x0000000000401000 0x1000 0x0 /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile
0x0000000000401000 0x0000000000402000 0x1000 0x1000 /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile
0x0000000000402000 0x0000000000403000 0x1000 0x2000 /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile
0x0000000000403000 0x0000000000404000 0x1000 0x2000 /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile
0x0000000000404000 0x0000000000405000 0x1000 0x3000 /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile
0x00007ff03939b000 0x00007ff0393c3000 0x28000 0x0 /usr/lib64/libc.so.6
0x00007ff0393c3000 0x00007ff03953b000 0x178000 0x28000 /usr/lib64/libc.so.6
0x00007ff03953b000 0x00007ff03958e000 0x53000 0x1a0000 /usr/lib64/libc.so.6
0x00007ff03958e000 0x00007ff039592000 0x4000 0x1f2000 /usr/lib64/libc.so.6
0x00007ff039592000 0x00007ff03959b000 0x9000 0x1f6000 /usr/lib64/libc.so.6
0x00007ff0395a3000 0x00007ff0395b4000 0x11000 0x0 /usr/lib64/libm.so.6
0x00007ff0395b4000 0x00007ff03963b000 0x87000 0x11000 /usr/lib64/libm.so.6
0x00007ff03963b000 0x00007ff03969b000 0x60000 0x98000 /usr/lib64/libm.so.6
0x00007ff03969b000 0x00007ff03969c000 0x1000 0xf7000 /usr/lib64/libm.so.6
0x00007ff03969c000 0x00007ff03969e000 0x2000 0xf8000 /usr/lib64/libm.so.6
0x00007ff0396a8000 0x00007ff0396a9000 0x1000 0x0 /usr/lib64/ld-linux-x86-64.so.2
0x00007ff0396a9000 0x00007ff0396d4000 0x2b000 0x1000 /usr/lib64/ld-linux-x86-64.so.2
0x00007ff0396d4000 0x00007ff0396df000 0xb000 0x2c000 /usr/lib64/ld-linux-x86-64.so.2
0x00007ff0396df000 0x00007ff0396e1000 0x2000 0x37000 /usr/lib64/ld-linux-x86-64.so.2
0x00007ff0396e1000 0x00007ff0396e3000 0x2000 0x39000 /usr/lib64/ld-linux-x86-64.so.2
(gdb) PASS: gdb.python/py-corefile.exp: test mapped files data: capture Python based mappings data
shell diff -s /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile-out-1.txt /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile-out-2.txt
Files /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile-out-1.txt and /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile-out-2.txt are identical
(gdb) PASS: gdb.python/py-corefile.exp: test mapped files data: diff input and output one
show-build-ids
Objfile Build-Id Core File Build-Id File Name
91c6abb593a519ecd18e543eaac25f913999b230 91c6abb593a519ecd18e543eaac25f913999b230 /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/outputs/gdb.python/py-corefile/py-corefile
Python Exception <class 'KeyError'>: 'corefile'
Error occurred in Python: 'corefile'
(gdb) PASS: gdb.python/py-corefile.exp: test mapped files data: show-build-ids
Mismatched build-ids Python vs Exception for <class 'KeyError'>: 'corefile'
Mismatched build-ids Error vs occurred for in Python: 'corefile'
FAIL: gdb.python/py-corefile.exp: test mapped files data: found expected build-ids in core file
check-main-executable
PASS
(gdb) PASS: gdb.python/py-corefile.exp: test mapped files data: check-main-executable
python core = gdb.selected_inferior().corefile
(gdb) PASS: gdb.python/py-corefile.exp: test mapped files data: python core = gdb.selected_inferior().corefile
python mapped_files = core.mapped_files()
(gdb) PASS: gdb.python/py-corefile.exp: test mapped files data: python mapped_files = core.mapped_files()
python print(type(mapped_files))
<class 'tuple'>
(gdb) PASS: gdb.python/py-corefile.exp: test mapped files data: python print(type(mapped_files))
python mapped_files[0] = None
Python Exception <class 'TypeError'>: 'tuple' object does not support item assignment
Error occurred in Python: 'tuple' object does not support item assignment
(gdb) PASS: gdb.python/py-corefile.exp: test mapped files data: python mapped_files[0] = None
python print(mapped_files[0] is None)
False
(gdb) PASS: gdb.python/py-corefile.exp: test mapped files data: python print(mapped_files[0] is None)
python regions = mapped_files[0].regions
(gdb) PASS: gdb.python/py-corefile.exp: test mapped files data: python regions = mapped_files[0].regions
python print(type(regions))
<class 'tuple'>
(gdb) PASS: gdb.python/py-corefile.exp: test mapped files data: python print(type(regions))
python regions[0] = None
Python Exception <class 'TypeError'>: 'tuple' object does not support item assignment
Error occurred in Python: 'tuple' object does not support item assignment
(gdb) PASS: gdb.python/py-corefile.exp: test mapped files data: python regions[0] = None
testcase /data/vries/gdb/src/gdb/testsuite/gdb.python/py-corefile.exp completed in 1 seconds
=== gdb Summary ===
# of expected passes 54
# of unexpected failures 1
Executing on host: /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/../../gdb/gdb -nw -nx -q -iex "set height 0" -iex "set width 0" -data-directory /data/vries/gdb/tumbleweed-20251005/build/gdb/data-directory -iex "set interactive-mode on" --version (timeout = 300)
builtin_spawn -ignore SIGHUP /data/vries/gdb/tumbleweed-20251005/build/gdb/testsuite/../../gdb/gdb -nw -nx -q -iex set height 0 -iex set width 0 -data-directory /data/vries/gdb/tumbleweed-20251005/build/gdb/data-directory -iex set interactive-mode on --version
GNU gdb (GDB) 18.0.50.20251007-git
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
/data/vries/gdb/tumbleweed-20251005/build/gdb/gdb version 18.0.50.20251007-git -nw -nx -q -iex "set height 0" -iex "set width 0" -data-directory /data/vries/gdb/tumbleweed-20251005/build/gdb/data-directory -iex "set interactive-mode on"
runtest completed at Tue Oct 7 15:34:59 2025
next prev parent reply other threads:[~2025-10-07 15:44 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-02 16:03 [PATCH 0/3] Core file Python API Andrew Burgess
2025-09-02 16:03 ` [PATCH 1/3] gdb/python: introduce gdb.Corefile API Andrew Burgess
2025-09-02 16:26 ` Eli Zaretskii
2025-09-16 17:25 ` Tom Tromey
2025-09-23 13:50 ` Andrew Burgess
2025-09-02 16:03 ` [PATCH 2/3] gdb: make structured core file mappings processing global Andrew Burgess
2025-09-16 17:28 ` Tom Tromey
2025-09-02 16:03 ` [PATCH 3/3] gdb/python: add Corefile.mapped_files method Andrew Burgess
2025-09-16 17:54 ` Tom Tromey
2025-09-23 13:52 ` Andrew Burgess
2025-09-23 13:44 ` [PATCHv2 0/3] Core file Python API Andrew Burgess
2025-09-23 13:44 ` [PATCHv2 1/3] gdb/python: introduce gdb.Corefile API Andrew Burgess
2025-10-03 18:56 ` Tom Tromey
2025-10-06 8:54 ` Andrew Burgess
2025-10-06 15:39 ` Tom Tromey
2025-10-06 16:13 ` Andrew Burgess
2025-09-23 13:44 ` [PATCHv2 2/3] gdb: make structured core file mappings processing global Andrew Burgess
2025-10-13 13:57 ` Lancelot SIX
2025-10-13 14:37 ` Andrew Burgess
2025-10-13 15:16 ` Six, Lancelot
2025-10-14 9:12 ` Lancelot SIX
2025-09-23 13:44 ` [PATCHv2 3/3] gdb/python: add Corefile.mapped_files method Andrew Burgess
2025-10-03 19:15 ` Tom Tromey
2025-10-07 6:24 ` Tom de Vries
2025-10-07 12:21 ` Andrew Burgess
2025-10-07 13:08 ` Tom de Vries
2025-10-07 13:26 ` Andrew Burgess
2025-10-07 14:38 ` Andrew Burgess
2025-10-07 15:43 ` Tom de Vries [this message]
2025-10-07 16:28 ` Andrew Burgess
2025-10-08 9:29 ` Andrew Burgess
2025-10-08 10:36 ` Tom de Vries
2025-10-08 14:14 ` Andrew Burgess
2025-10-08 15:43 ` Tom de Vries
2025-10-08 16:03 ` Andrew Burgess
2025-10-16 20:00 ` Tom Tromey
2025-10-17 10:02 ` Andrew Burgess
2025-10-17 13:32 ` Andrew Burgess
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3996ddc9-2cb4-4ead-8895-5d6b27b5a72c@suse.de \
--to=tdevries@suse.de \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox