public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Luis Machado <luis.machado@linaro.org>
To: Florian Weimer <fweimer@redhat.com>,
	systemtap <systemtap@sourceware.org>
Cc: Sergio Durigan Junior <sergiodj@sergiodj.net>,
	Luis Machado via Gdb <gdb@sourceware.org>,
	Luis Machado via Libc-alpha <libc-alpha@sourceware.org>,
	doko@debian.org, "Maciej W. Rozycki" <macro@orcam.me.uk>,
	Ulrich Weigand <uweigand@de.ibm.com>
Subject: Re: GDB shared library tracking with stap probes x _dl_debug_state
Date: Mon, 24 May 2021 11:22:47 -0300	[thread overview]
Message-ID: <d07701dc-4f26-1999-1c57-60c737809ee5@linaro.org> (raw)
In-Reply-To: <22cab26b-8931-ffc0-5324-bff640773924@linaro.org>

Maciej,

Do you have any feedback on this for MIPS?

On 5/10/21 11:16 AM, Luis Machado wrote:
> cc-ing Maciej and Ulrich for feedback about MIPS / rs6000. I see both 
> architectures rely on marking some symbols as special, for different 
> purposes.
> 
> On 5/8/21 7:55 AM, Florian Weimer wrote:
>> * Sergio Durigan Junior:
>>
>>> On Friday, May 07 2021, Luis Machado via Gdb wrote:
>>>
>>>> On 5/7/21 5:44 PM, Florian Weimer wrote:
>>>>> * Luis Machado via Libc-alpha:
>>>>>
>>>>>> That's all fine, but there is one small detail that doesn't work for
>>>>>> armhf, and that is discovering if we're dealing with a PC that is arm
>>>>>> mode or thumb mode.
>>>>> Is it possible to recognize Arm mode vs thumb mode based on the NOP
>>>>> encoding at the probe address?
>>>>>
>>>>
>>>> If we know the instruction is a NOP, it might be possible.
>>>
>>> I think it's guaranteed that the instruction is always going to be a
>>> NOP.
> 
> That's good, but ...
> 
>>
>> Maybe we can add a comment to that effect to the Systemtap sources?
>>
>> Start of the thread is here:
>>
>>    <https://sourceware.org/pipermail/gdb/2021-May/049421.html>
>>
>> I think there are four distinct two-byte patterns at the probe
>> addressing, depending on endianess and thumb/non-thumb mode.  Looking at
>> the instruction has the clear advantage that it works with today's
>> binaries.
> ... the way the breakpoint selection works doesn't take into account 
> additional input like this. It would be a non-trivial change. Not too 
> complex, but still not trivial.
> 
> If this is to be implemented, it would be nice to make sure there are 
> other architectures affected by this problem and that this sort of 
> solution also works for them.
> 
> Maciej, do you think MIPS will run into the same issue? If so, is this 
> an acceptable solution?
> 
> I still think having the symbol information is a cleaner solution.

      parent reply	other threads:[~2021-05-24 14:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <b0b35028-2463-dd00-14af-22be2e7b6ff6@linaro.org>
     [not found] ` <878s4qb7fj.fsf@oldenburg.str.redhat.com>
     [not found]   ` <07b03137-a083-dada-68da-965779cd41ff@linaro.org>
     [not found]     ` <87bl9mi4xi.fsf@paluero>
2021-05-08 10:55       ` Florian Weimer
2021-05-10 14:16         ` Luis Machado
2021-05-11  8:00           ` Ulrich Weigand
2021-05-24 14:22           ` Luis Machado [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=d07701dc-4f26-1999-1c57-60c737809ee5@linaro.org \
    --to=luis.machado@linaro.org \
    --cc=doko@debian.org \
    --cc=fweimer@redhat.com \
    --cc=gdb@sourceware.org \
    --cc=libc-alpha@sourceware.org \
    --cc=macro@orcam.me.uk \
    --cc=sergiodj@sergiodj.net \
    --cc=systemtap@sourceware.org \
    --cc=uweigand@de.ibm.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).