crash
crash copied to clipboard
Is this `gdb` functionality supposed to work?
I know i'm able to define macros in ~/.gdbinit
(just not interactively using define
from the crash
prompt)
hoping to have a string comparison in such a macro using $_streq
as per https://sourceware.org/gdb/onlinedocs/gdb/Convenience-Funs.html
When I have the test macro
define dotest
if $_streq("1", "1")
echo ok\n
end
end
I observe different results between gdb
and crash
(gdb) dotest
ok
vs
crash> dotest
You can't do that without a process to debug.
gdb: gdb request failed: dotest
----- Original Message -----
I know i'm able to define macros in
~/.gdbinit
(just not interactively usingdefine
from thecrash
prompt)hoping to have a string comparison in such a macro using
$_streq
as per https://sourceware.org/gdb/onlinedocs/gdb/Convenience-Funs.htmlWhen I have the test macro
define dotest if $_streq("1", "1") echo ok\n end end
I observe different results between
gdb
andcrash
(gdb) dotest ok
vs
crash> dotest You can't do that without a process to debug. gdb: gdb request failed: dotest
Apparently not. As the error message states, you can't do it "without a process to debug". And when the crash utility uses gdb, it brings it up as "gdb vmlinux", so there is no concept of a process.
Dave
-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/crash-utility/crash/issues/31
but the gdb
test I tested with was not attached to a running process either (launched just as $ gdb
)
----- Original Message -----
but the
gdb
test I tested with was not attached to a running process either (launched just as$ gdb
)
Yeah, hmmm, then I don't know what the issue is. I've never tried to use a gdb macro from within crash before.