[Bug gdb/25650] New: GDB can't 'printf' a convenience variable holding an inferior address

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug gdb/25650] New: GDB can't 'printf' a convenience variable holding an inferior address

glaubitz at physik dot fu-berlin.de
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.
Reply | Threaded
Open this post in threaded view
|

[Bug gdb/25650] GDB can't 'printf' a convenience variable holding an inferior address

glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=25650

Sergio Durigan Junior <sergiodj at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #1 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
Fixed by

https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=141e490226a99e0359393ddaca5628c68de036dc

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug gdb/25650] GDB can't 'printf' a convenience variable holding an inferior address

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=25650

Sergio Durigan Junior <sergiodj at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |9.2

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