public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "toyaniv at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/31578] GDB shows wrong offset value using 'info proc mapping'
Date: Fri, 29 Mar 2024 13:49:35 +0000	[thread overview]
Message-ID: <bug-31578-4717-6x4sWqDy2D@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31578-4717@http.sourceware.org/bugzilla/>

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

--- Comment #2 from Yaniv Buta <toyaniv at gmail dot com> ---
(In reply to Tom Tromey from comment #1)
> "info proc mapping" is just a very thin wrapper that
> reads /proc/$pid/maps.  Can you examine that file with "cat"?
> I suspect there's no gdb problem here.

Hi Tom

Thanks for replying that fast.

Indeed, below is that cat command and now it seems as OS bug...
Can you suggest what actually going on ? 
I wonder what makes the offset be miscalculated that way by the OS ...

(gdb) shell
$ uname -a
Linux 0d142311433c 6.6.9-amd64 #1 SMP PREEMPT_DYNAMIC Kali 6.6.9-1kali1
(2024-01-08) x86_64 x86_64 x86_64 GNU/Linux

$ cat /proc/25/maps
562634041000-562634044000 r--p 00000000 08:01 1208457                   
/home/ctf/device_control
562634044000-562634049000 r-xp 00003000 08:01 1208457                   
/home/ctf/device_control
562634049000-56263404b000 r--p 00008000 08:01 1208457                   
/home/ctf/device_control
56263404b000-56263404c000 r--p 00009000 08:01 1208457                   
/home/ctf/device_control
56263404c000-56263404d000 rw-p 0000a000 08:01 1208457                   
/home/ctf/device_control

Thanks,
Yaniv

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

  parent reply	other threads:[~2024-03-29 13:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29 13:24 [Bug gdb/31578] New: " 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 [this message]
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

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=bug-31578-4717-6x4sWqDy2D@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).