public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/31578] New: GDB shows wrong offset value using 'info proc mapping'
@ 2024-03-29 13:24 toyaniv at gmail dot com
  2024-03-29 13:39 ` [Bug gdb/31578] " tromey at sourceware dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: toyaniv at gmail dot com @ 2024-03-29 13:24 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31578

            Bug ID: 31578
           Summary: GDB shows wrong offset value using 'info proc mapping'
           Product: gdb
           Version: 12.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: toyaniv at gmail dot com
  Target Milestone: ---

Created attachment 15445
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15445&action=edit
info prov mapping with wrong offset on 4th row

solving hackthebox retired pwn challenge I found out that gdb show wrong
offset:

we can see on 3rd (start addr 0x562634049000) that offset is 0x8000 and size is
0x2000
but in 4th (start adr 0x56263404b000) it shows offset 0x9000 instead of
expected offset 0xa000 (0x8000+0x2000)

(gdb) info proc mapping
process 25
Mapped address spaces:

          Start Addr           End Addr       Size     Offset  Perms  objfile
      0x562634041000     0x562634044000     0x3000        0x0  r--p  
/home/ctf/device_control
      0x562634044000     0x562634049000     0x5000     0x3000  r-xp  
/home/ctf/device_control
      0x562634049000     0x56263404b000     0x2000     0x8000  r--p  
/home/ctf/device_control
      0x56263404b000     0x56263404c000     0x1000     0x9000  r--p  
/home/ctf/device_control
      0x56263404c000     0x56263404d000     0x1000     0xa000  rw-p  
/home/ctf/device_control
      0x5626340c8000     0x56263412b000    0x63000        0x0  rw-p   [heap]

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-03-30 21:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-29 13:24 [Bug gdb/31578] New: GDB shows wrong offset value using 'info proc mapping' toyaniv at gmail dot com
2024-03-29 13:39 ` [Bug gdb/31578] " tromey at sourceware dot org
2024-03-29 13:49 ` toyaniv at gmail dot com
2024-03-29 14:31 ` schwab@linux-m68k.org
2024-03-29 14:42 ` toyaniv at gmail dot com
2024-03-29 15:29 ` schwab@linux-m68k.org
2024-03-29 15:31 ` toyaniv at gmail dot com
2024-03-29 15:32 ` toyaniv at gmail dot com
2024-03-30 21:34 ` toyaniv at gmail dot com

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).