]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/corefiles] Sort info proc mappings table
authorTom de Vries <tdevries@suse.de>
Mon, 1 Dec 2025 11:41:00 +0000 (12:41 +0100)
committerTom de Vries <tdevries@suse.de>
Mon, 1 Dec 2025 11:41:00 +0000 (12:41 +0100)
commit294cb98c95a0466eca90d5b1a512db44fae45c3d
tree41f43c4ff66dcdf9b2a62dd687104e7699078cf3
parenta6e20ab0bb970bd64f52619ffd47099629e630a8
[gdb/corefiles] Sort info proc mappings table

On x86_64-linux, with test-case gdb.python/py-corefile.exp I run into:
...
FAIL: $exp: test mapped files data: diff input and output one
...

The failing test compares the output of:
- info proc mappings, and
- info proc py-mappings, a python implementation of "info proc mappings".

The difference in output is order: while the latter prints the entries sorted
on start address, the former doesn't.

Fix this by sorting the entries in linux_read_core_file_mappings.

Tested on x86_64-linux.

PR corefiles/33543
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33543
gdb/linux-tdep.c