public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/27234] New: gdb.Value causes abort when converted to string
@ 2021-01-24 16:00 grazfather at gmail dot com
  2021-01-24 16:13 ` [Bug python/27234] " grazfather at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: grazfather at gmail dot com @ 2021-01-24 16:00 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 27234
           Summary: gdb.Value causes abort when converted to string
           Product: gdb
           Version: 10.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: python
          Assignee: unassigned at sourceware dot org
          Reporter: grazfather at gmail dot com
  Target Milestone: ---

This was reported via github: https://github.com/hugsy/gef/issues/593, but it's
a bug in GDB.

Compile the following go code:

```
package main

import (
       "fmt"
)

func main() {
       fmt.Printf("hi");
}
```

for x86_64.

Open it in GDB 10.1

b main.main
run
ni 7

Now run in a python interpreter
```
current_frame = gdb.selected_frame()
frame_args = gdb.FrameDecorator.FrameDecorator(current_frame).frame_args() or
[]
values = [x.sym.value(current_frame) for x in frame_args]
# You should get a list of four values
# value 1 can be converted to a string
str(values[1])
# This will abort
str(values[0])
```

-- 
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:[~2023-04-17 16:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-24 16:00 [Bug python/27234] New: gdb.Value causes abort when converted to string grazfather at gmail dot com
2021-01-24 16:13 ` [Bug python/27234] " grazfather at gmail dot com
2022-06-11 19:27 ` tromey at sourceware dot org
2022-06-20 14:48 ` grazfather at gmail dot com
2023-04-17 16:55 ` 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).