public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/18394] New: struct member address printing is off.
@ 2015-05-09 22:10 darpeer at hotmail dot com
  2024-01-02 20:19 ` [Bug gdb/18394] " ssbssa at sourceware dot org
  0 siblings, 1 reply; 2+ messages in thread
From: darpeer at hotmail dot com @ 2015-05-09 22:10 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 18394
           Summary: struct member address printing is off.
           Product: gdb
           Version: 7.9
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: darpeer at hotmail dot com
  Target Milestone: ---

Created attachment 8307
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8307&action=edit
The .o file with the mentioned structure.

The members 'a' and 'b' of the structure 'l_' are printed at the same address.

struct ODD_S {
    char a[/*0x2000 */   2097152];
    char b[/*0x400 */  536870912];
    char c[/*0x8000 */  33554432];
} l_;

-- 
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 gdb/18394] struct member address printing is off.
  2015-05-09 22:10 [Bug gdb/18394] New: struct member address printing is off darpeer at hotmail dot com
@ 2024-01-02 20:19 ` ssbssa at sourceware dot org
  0 siblings, 0 replies; 2+ messages in thread
From: ssbssa at sourceware dot org @ 2024-01-02 20:19 UTC (permalink / raw)
  To: gdb-prs

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

Hannes Domani <ssbssa at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ssbssa at sourceware dot org
   Target Milestone|---                         |8.0
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #1 from Hannes Domani <ssbssa at sourceware dot org> ---
I can reproduce the issue with gdb-11.1:
```
(gdb) p &l_.a[0]
$1 = 0x0 <l_>
(gdb) p &l_.b[0]
$2 = 0x200000 <l_+2097152> ""
(gdb) p &l_.c[0]
$3 = 0x200000 <l_+2097152> ""
```

But no longer since gdb-8.0 and newer:
```
(gdb) p &l_.a[0]
$1 = 0x0 <l_>
(gdb) p &l_.b[0]
$2 = 0x200000 <l_+2097152> ""
(gdb) p &l_.c[0]
$3 = 0x20200000 <l_+538968064> ""
```

-- 
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-01-02 20:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-09 22:10 [Bug gdb/18394] New: struct member address printing is off darpeer at hotmail dot com
2024-01-02 20:19 ` [Bug gdb/18394] " ssbssa at sourceware dot 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).