Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Alexandra Petlanova Hajkova <ahajkova@redhat.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org, ezulian@redhat.com
Subject: Re: [PATCH] Add drg_why_sleeping.py
Date: Wed, 2 Sep 2026 17:29:08 +0200	[thread overview]
Message-ID: <CAJVr-EP2sJEmd30x2hHm2yow+UKR85i0K+dt-WV6mnMgPzj0xQ@mail.gmail.com> (raw)
In-Reply-To: <87ik4o7w34.fsf@tromey.com>

[-- Attachment #1: Type: text/plain, Size: 1738 bytes --]

On Tue, Sep 1, 2026 at 6:54 PM Tom Tromey <tom@tromey.com> wrote:

> >>>>> "Alexandra" == Alexandra Hájková <ahajkova@redhat.com> writes:
>
> Hi.  Thanks for the patch.
>
> I'm not sure this is really something gdb ought to ship.
>
> Alexandra>  sleep_test.c                                  | 76
> +++++++++++++++++++
>
> This file shouldn't be here.
>
> Alexandra> +           (gdb) source
> ~/binutils-gdb/gdb/python/lib/gdb/command/drgn_why_sleeping.py
>
> Normally commands are auto-installed.
>
Yeah, sorry, I originally didn't specify --data-directory so it ended up not
sourced for me.

>
> Alexandra> +           (gdb) drgn_why_sleeping
>
> This isn't a very gdb-ish name.  At the very least gdb usually uses "-"
> as a separator; I always thought maybe it inherited a Lispy style from
> the RMS days.  But maybe a prefix command would be better anyhow.
>

I'm happy to change the name, it was just the first one that came to mind.

>
>
> Extra parens?
>
> Alexandra> +                    "Can't read /proc/kcore, %s. Try running
> GDB as root. " % str(e)
>
> We can't ever recommend running gdb as root.
>
So,  you recommend just saying we can't read kcore without saying
anything about running GDB as root making things work. Sure, let's
make this bit secret.


> I don't normally like to make drastic pronouncements like that, but gdb
> is nowhere near hardened enough for this kind of thing.  In fact it's
> more accurate to say that gdb doesn't even try, it's ridiculously
> exposed.
>

So,  you recommend just saying we can't read kcore without saying
anything about running GDB as root making things work. Sure, let's
make this bit secret.




>
> Tom
>
>

[-- Attachment #2: Type: text/html, Size: 3048 bytes --]

      reply	other threads:[~2026-09-02 15:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31 20:54 [RFC PATCH 0/1] gdb/python: add drg_why_sleeping command Alexandra Hájková
2026-08-31 20:54 ` [PATCH] Add drg_why_sleeping.py Alexandra Hájková
2026-09-01 16:52   ` Tom Tromey
2026-09-02 15:29     ` Alexandra Petlanova Hajkova [this message]

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=CAJVr-EP2sJEmd30x2hHm2yow+UKR85i0K+dt-WV6mnMgPzj0xQ@mail.gmail.com \
    --to=ahajkova@redhat.com \
    --cc=ezulian@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.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