public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/25650] New: GDB can't 'printf' a convenience variable holding an inferior address
@ 2020-03-09 22:45 sergiodj at redhat dot com
  2020-03-09 22:57 ` [Bug gdb/25650] " sergiodj at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: sergiodj at redhat dot com @ 2020-03-09 22:45 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 25650
           Summary: GDB can't 'printf' a convenience variable holding an
                    inferior address
           Product: gdb
           Version: 9.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: sergiodj at redhat dot com
  Target Milestone: ---

This is a regression from 8.3.

When assigning an inferior address to a convenience variable, GDB is unable to
print it correctly.  It's possible to reproduce this bug by doing:

$ echo -e 'int main(){const char a[]="test";return 0;}' | gcc -x c - -O0-g3
$ ./gdb/gdb --data-directory ./gdb/data-directory -q ./a.out -ex 'start' -ex
'set $x = (const char *) (&a[0] + 2)' -ex 'printf "%s\n", $x'

This has been fixed upstream; I'm creating this bug to backport the fix to the
9.1 branch.

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

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

end of thread, other threads:[~2021-09-22 17:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-09 22:45 [Bug gdb/25650] New: GDB can't 'printf' a convenience variable holding an inferior address sergiodj at redhat dot com
2020-03-09 22:57 ` [Bug gdb/25650] " sergiodj at redhat dot com
2020-03-11 16:32 ` sergiodj at redhat dot com
2021-09-22 16:58 ` mervegunesli at aol dot com
2021-09-22 17:03 ` mark at klomp 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).