Comments (3)
Actually I don't think it'll take much refactoring. Let's just make drgn_get_initial_registers()
(via all of the arch-specific callbacks that implement it) return a NULL
struct drgn_register_state *
if there are no initial registers. Then each callback can decide what constitutes a hard error vs. a lack of a stack. I.e.,
struct drgn_register_state *regs;
err = drgn_get_initial_registers(..., ®s);
if (err)
// handle hard error.
if (!regs)
// return empty stack trace
// Handle common case
from drgn.
I like your option (a) because in general, when stack unwinding hits a FaultError
, it stops and returns what it got so far; this would be an extension of that to the first frame. I don't love the idea of checking task.stack
directly though, since I'm also not confident about task lifetimes (and it could be racy). I think it'd be better to catch the FaultError
/DRGN_ERROR_FAULT
at the source (in this case probably linux_kernel_get_initial_registers_x86_64
), although that might require some refactoring.
from drgn.
Sounds good to me, I'll take a look at what sort of refactor it would be.
from drgn.
Related Issues (20)
- libdrgn does not compile on ARM32 HOT 2
- Support Maple tree data structure
- vmtest.vm: failing tests when run locally HOT 2
- Add framework for running higher-level commands in interactive mode HOT 13
- contrib/tcp_sock.py fails for older kernels (<= `v5.18`)
- Need suggestion: do we have APIs to get a member of a struct object for dump and live kernel inside libdrgn HOT 2
- Segmentation fault when drgn finishes with libkdumpfile HOT 7
- Support reading of `vmlinux` in the same folder as `--core` file
- opening of a --vmcore file of a different architecture HOT 1
- Add Architecture Support to main part of the manual HOT 1
- Help: could not find loaded kernel modules
- Issue finding string literal in readonly memory for userland core HOT 2
- drgn failed to debug vmcore with lzo format HOT 1
- drgn broken on kernel 6.4 HOT 1
- Test failure on Python 3.12 beta HOT 5
- Stack unwinding is broken in Linux 6.4 on x86-64 due to ORC format change HOT 5
- Stack unwinding cannot go beneath IRQ frames HOT 8
- print_annotated_stack() assumes a contiguous stack
- print "<absent>" result HOT 2
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 drgn.