public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug exp/28359] New: ptype/o does not show offset if the current language is asm
@ 2021-09-21  9:08 fweimer at redhat dot com
  2022-11-07 17:08 ` [Bug exp/28359] " tromey at sourceware dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: fweimer at redhat dot com @ 2021-09-21  9:08 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 28359
           Summary: ptype/o does not show offset if the current language
                    is asm
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: exp
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
  Target Milestone: ---

Reproducer:

$ gdb /lib64/libc.so.6
[…]
Reading symbols from /lib64/libc.so.6...
Reading symbols from
/usr/lib/debug/usr/lib64/libc-2.32.so-2.32-10.fc33.x86_64.debug...
(gdb) set language asm
(gdb) ptype/o struct _IO_FILE
type = struct _IO_FILE {
    int _flags;
    char *_IO_read_ptr;
    char *_IO_read_end;
    char *_IO_read_base;
    char *_IO_write_base;
    char *_IO_write_ptr;
    char *_IO_write_end;
    char *_IO_buf_base;
    char *_IO_buf_end;
    char *_IO_save_base;
    char *_IO_backup_base;
    char *_IO_save_end;
    _IO_marker *_markers;
    _IO_FILE *_chain;
    int _fileno;
    int _flags2;
    __off_t _old_offset;
    unsigned short _cur_column;
    signed char _vtable_offset;
    char _shortbuf[1];
    _IO_lock_t *_lock;
    __off64_t _offset;
    _IO_codecvt *_codecvt;
    _IO_wide_data *_wide_data;
    _IO_FILE *_freeres_list;
    void *_freeres_buf;
    size_t __pad5;
    int _mode;
    char _unused2[20];
}

If GDB can find the type, it should be able to figure out the proper language
as well. Using the current language for determining type layout seems wrong.

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

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

end of thread, other threads:[~2022-11-09 16:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-21  9:08 [Bug exp/28359] New: ptype/o does not show offset if the current language is asm fweimer at redhat dot com
2022-11-07 17:08 ` [Bug exp/28359] " tromey at sourceware dot org
2022-11-07 21:00 ` tromey at sourceware dot org
2022-11-08 20:17 ` tromey at sourceware dot org
2022-11-09 15:40 ` cvs-commit at gcc dot gnu.org
2022-11-09 16:07 ` tromey 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).