* gdb vmlinux scripting
@ 2022-11-28 21:46 jim.cromie
0 siblings, 0 replies; only message in thread
From: jim.cromie @ 2022-11-28 21:46 UTC (permalink / raw)
To: kernelnewbies
so Im debugging a kernel,
running inside virtme (I cant recommend it enough)
using 2 terminals, each in build-dir
1st runs
function dkrunk () {
echo vm $KRUN_SHOW $KRUN_STDS $KDBG_OPTS $* $QM_OPTS --smp 3 -s -S
virtme-run $KRUN_SHOW $KRUN_STDS $KDBG_OPTS $* $QM_OPTS --smp 3 -s -S
# -qmp tcp:localhost:4444,server,nowait
}
2nd runs:
alias tui='gdb --tui -q -x ../../../gdb-2 vmlinux'
that script is
# seems I need a hardware breakpoint to get started,
# is that the case for anyone else ?
hbreak dynamic_debug_init
c
b strcmp if cs == ct
c
If you do this, youll find all the places where
strcmp is called on identical args.
Most of them I dont want to see,
but what kind of syntax lets me look up the frame(s)
to select only the contexts of interest ?
it would be useful enough to test just the caller file,
that would get me a long way
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-28 21:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28 21:46 gdb vmlinux scripting jim.cromie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.