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
` (4 more replies)
0 siblings, 5 replies; 6+ 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] 6+ messages in thread* [Bug python/27234] gdb.Value causes abort when converted to string 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 ` grazfather at gmail dot com 2022-06-11 19:27 ` tromey at sourceware dot org ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: grazfather at gmail dot com @ 2021-01-24 16:13 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=27234 --- Comment #1 from grazfather at gmail dot com --- GNU gdb (Ubuntu 10.1-1.6ubuntu1) 10.1.90.20210103-git -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug python/27234] gdb.Value causes abort when converted to string 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 ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: tromey at sourceware dot org @ 2022-06-11 19:27 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=27234 Tom Tromey <tromey at sourceware dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tromey at sourceware dot org --- Comment #2 from Tom Tromey <tromey at sourceware dot org> --- I tried this and it worked for me. However I don't know Go. How exactly did you compile it? -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug python/27234] gdb.Value causes abort when converted to string 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 2025-03-06 18:13 ` grazfather at gmail dot com 4 siblings, 0 replies; 6+ messages in thread From: grazfather at gmail dot com @ 2022-06-20 14:48 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=27234 --- Comment #3 from grazfather at gmail dot com --- Simply with `go build x.go` -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug python/27234] gdb.Value causes abort when converted to string 2021-01-24 16:00 [Bug python/27234] New: gdb.Value causes abort when converted to string grazfather at gmail dot com ` (2 preceding siblings ...) 2022-06-20 14:48 ` grazfather at gmail dot com @ 2023-04-17 16:55 ` tromey at sourceware dot org 2025-03-06 18:13 ` grazfather at gmail dot com 4 siblings, 0 replies; 6+ messages in thread From: tromey at sourceware dot org @ 2023-04-17 16:55 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=27234 Tom Tromey <tromey at sourceware dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |WAITING Last reconfirmed| |2023-04-17 --- Comment #4 from Tom Tromey <tromey at sourceware dot org> --- With Fedora 36 gdb (12.1) I don't see a crash. Could you try a newer gdb? I wonder if it's been fixed. Also, FTR, I had to use the golang go (not gcc.go) to even get these values. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug python/27234] gdb.Value causes abort when converted to string 2021-01-24 16:00 [Bug python/27234] New: gdb.Value causes abort when converted to string grazfather at gmail dot com ` (3 preceding siblings ...) 2023-04-17 16:55 ` tromey at sourceware dot org @ 2025-03-06 18:13 ` grazfather at gmail dot com 4 siblings, 0 replies; 6+ messages in thread From: grazfather at gmail dot com @ 2025-03-06 18:13 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=27234 --- Comment #5 from grazfather at gmail dot com --- I can still reproduce this on GDB 12.1 from ubuntu 22.04.2 installed via apt-get. Will work to reproduce on 16.2 -- 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:[~2025-03-06 18:13 UTC | newest] Thread overview: 6+ 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 2025-03-06 18:13 ` grazfather at gmail dot com
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).