Comments (6)
Turns out the pipe is broken because gdb segfaults and the process exits (becomes defunct/zombie). The segfault only occurs when debugging a rust program under pygdbmi, not when running directly from gdb's commandline, or debugging any other language.
The dmesg log shows
[ 4467.187888] gdb[13609]: segfault at 0 ip 00000000006489ed sp 00007ffc0a0ce260 error 4 in gdb[400000+617000]
Running again with strace output logged yields this as the last line.
ptrace(PTRACE_GETREGSET, 14037, NT_X86_XSTATE, [{0x7ffe8bb4ee20, 832}]) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0} ---
+++ killed by SIGSEGV +++
See attached file gdb_strace.txt for the full strace log.
Tagging @o11c in case you have any ideas on steps forward.
from gdbgui.
Interesting. Didn't expect a segfault to be the reason. Will be watching this.
from gdbgui.
The segfault occurs in -data-list-register-values x
regardless of whether it's run as a subprocess or not. The bug was fixed in gdb's [git repository](git clone git://sourceware.org/git/binutils-gdb.git), commit b96645f1a1e608 "Add support for untagged unions in Rust".
The HEAD of gdb's master branch does not have this bug, so the next gdb release (version 8) should have this issue fixed. For now, I will add a warning to gdbgui, and disable the -data-list-register-values x
if gdbgui was able to determine rust source files were used to compile the executable.
Bug filed with gdb: https://sourceware.org/bugzilla/show_bug.cgi?id=21450
from gdbgui.
@sharazam I added logic to prevent gdbgui from fetching register values when using gdb 7.12.x and debugging a Rust executable, which avoids the segfault. gdbgui also displays a warning to users that this is occurring. If you ever get tired of the TUI and want to try gdbgui again, you can upgrade it and it should work for your rust program.
from gdbgui.
Can you still fetch the values using -var-create $registername
?
from gdbgui.
Doesn't seem to be valid syntax:
-var-create rax
-var-create: Usage: NAME FRAME EXPRESSION.
however info registers
works
info registers
rax 0x7fffffffdfd0
140737488347088
rbx 0x0
0
rcx 0x604028
6307880
from gdbgui.
Related Issues (20)
- GDBGUI _ when gdb is missing.
- Mixed SOURCE/ASM mode for stepping through code. HOT 1
- --remap-sources questions HOT 1
- Symbols for the gio command
- gdbgui PWD HOT 1
- not work UBUNTU 23.04 HOT 2
- Feature Req:Modify Code in GDBGUI
- Source file decoding errors
- server() got an unexpected keyword argument 'ssl_context' HOT 1
- Add docker build env support?
- AttributeError: module 'ssl' has no attribute 'wrap_socket' HOT 3
- When debugging in Windows remotely, the directory tree of the interface should be a remote or local directory
- Showcased the structure of the remote file system, but said that the files could not be found and were all present
- Package dependencies are too strict HOT 1
- cannot find source code “ file not found: /home/Administrator/hello.c”
- Side panel scroll position resets on step
- Add breakpoint in disassembly by clicking
- Improve design for the visually impaired
- Hardcoded 10 seconds gdb timeout is too low for some applications HOT 1
- How to show deferenced pointer value ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gdbgui.