Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Bruce Korb <bruce.korb@gmail.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Abhijit Halder <abhijit.k.halder@gmail.com>, gdb@sourceware.org
Subject: Re: custom runtime GDB extensions
Date: Mon, 22 Oct 2012 22:01:00 -0000	[thread overview]
Message-ID: <CAKRnqNL3yms4_Rn9mOBN=f3UyTuhBiTQajTUV=GpK2j+jp6wWQ@mail.gmail.com> (raw)
In-Reply-To: <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


  reply	other threads:[~2012-10-22 22:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-21 23:35 Bruce Korb
2012-10-22 21:01 ` Tom Tromey
2012-10-22 22:01   ` Bruce Korb [this message]
2012-10-23 19:10     ` Tom Tromey
2012-10-23 19:42       ` Bruce Korb
2012-10-23 19:49         ` Joel Brobecker
2012-10-23 20:01           ` Bruce Korb
2012-10-23 20:28         ` Tom Tromey
2012-10-23 20:54           ` Bruce Korb
2012-10-23 21:01             ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKRnqNL3yms4_Rn9mOBN=f3UyTuhBiTQajTUV=GpK2j+jp6wWQ@mail.gmail.com' \
    --to=bruce.korb@gmail.com \
    --cc=abhijit.k.halder@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox