This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: custom runtime GDB extensions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]