public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/27159] New: maintenance command to ignore probes
Date: Fri, 08 Jan 2021 10:04:43 +0000	[thread overview]
Message-ID: <bug-27159-4717@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=27159

            Bug ID: 27159
           Summary: maintenance command to ignore probes
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

On f.i. current openSUSE, libs like libgcc and glibc contain probes, which gdb
uses for various things.

There may be a fallback scenario for the case when probes are not present. 
F.i., for installing a master exception breakpoint, if the libgcc/unwind probe
is not present, the libgcc hook _Unwind_DebugHook is used instead.

It may be interesting or necessary (to test a fix) to test the fallback
scenario, but AFAICT it's not possible to do this without modifying sources. 
There is a command to disable individual probes, but for the libgcc/unwind one,
I get:
...
(gdb) disable probes libgcc unwind
Probe libgcc:unwind cannot be disabled.
...

F.i., I did this to disable all probes:
...
diff --git a/gdb/elfread.c b/gdb/elfread.c
index ce63d6b4b56..6667b6799e7 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -1404,10 +1404,12 @@ elf_get_probes (struct objfile *objfile)
     {
       probes_per_bfd = probe_key.emplace (objfile->obfd);

+#if 0
       /* Here we try to gather information about all types of probes from the
         objfile.  */
       for (const static_probe_ops *ops : all_static_probe_ops)
        ops->get_probes (probes_per_bfd, objfile);
+#endif
     }

   return *probes_per_bfd;
...
to be able to test whether the code using _Unwind_DebugHook still worked.

So perhaps a command "maintenance probes-disable" could be convenient.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2021-01-08 10:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08 10:04 vries at gcc dot gnu.org [this message]
2022-12-05 13:50 ` [Bug cli/27159] " vries at gcc dot gnu.org
2022-12-05 14:48 ` vries at gcc dot gnu.org
2022-12-07  9:03 ` vries at gcc dot gnu.org
2022-12-14 15:25 ` vries at gcc dot gnu.org
2022-12-31  9:23 ` cvs-commit at gcc dot gnu.org
2022-12-31  9:38 ` vries at gcc dot gnu.org

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=bug-27159-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).