This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: custom runtime GDB extensions
- From: Bruce Korb <bruce dot korb at gmail dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Abhijit Halder <abhijit dot k dot halder at gmail dot com>, gdb at sourceware dot org
- Date: Mon, 22 Oct 2012 15:01:25 -0700
- Subject: Re: custom runtime GDB extensions
- References: <508486C7.4080505@gmail.com> <87pq4agr0t.fsf@fleche.redhat.com>
Hi Tom,
Thank you.
On Mon, Oct 22, 2012 at 2:01 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Bruce" == Bruce Korb <bruce.korb@gmail.com> writes:
>
> Bruce> I don't know exactly why the dlopen of shared objects is
> Bruce> disparaged, because I couldn't find references via Googling.
>
> I think the fundamental reason is that we don't want to keep C API
> compatibility in gdb.
>
> There's the JIT API, of course, but it is intentionally very limited.
Perhaps that is the ticket. I don't really want access to lots of internals,
my goal is to be able to call a dynamically loaded function that can print
some information about the arguments passed in, as exampled below.
If the "JIT API" is up to that task, then I don't need anything grander.
I searched backward from dlopen to functions that used it and didn't
trace my way to anything I could figure out how to use.
(gdb) plugin add ~/work/GIT/flag-project/mask-disp.so
(gdb) mask
The following mask types are supported:
at-flag
cfg-flag
config-flag
ldd-flag
ldlm-cancel-flag
ldlm-flag
ll-file-flag
llog-ctxt-flag
llog-flag
llog-misc-flag
lmd-flag
obd-connect-flag
obd-flag
obd-incompat-flag
obd-llog-flag
os-state-flag
ptlrpc-reply-flag
ptlrpc-sec-flag
(gdb) mask obd-flag all
0xF03FFF7F represents:
inlinedata obdmdexists delorphan norpc idonly recreate_objs
debug_check no_usrquota no_grpquota create_crow srvlock
cksum_crc32 cksum_adler cksum_crc32c cksum_rsvd2 cksum_rsvd3
shrink_grant mmap recov_resend nospc_blk short_io local-1
local-2 local-3 local-4
(gdb) mask obd-flag srvlock short_io obdmdexists
0x200802 represents:
obdmdexists srvlock short_io
(gdb) mask obd-flag 0707
0x147 represents:
inlinedata obdmdexists delorphan debug_check no_usrquota