This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 6/8] gdbserver/s390: Add fast tracepoint support.
- From: Marcin KoÅcielnicki <koriakin at 0x04 dot net>
- To: Antoine Tremblay <antoine dot tremblay at ericsson dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 19 Feb 2016 14:41:38 +0100
- Subject: Re: [PATCH 6/8] gdbserver/s390: Add fast tracepoint support.
- Authentication-results: sourceware.org; auth=none
Thanks for your suggestion, but I'm afraid I won't be doing it that way at all. We're not quite out of the woods yet on multi-tdesc targets: see https://sourceware.org/bugzilla/show_bug.cgi?id=13808 . This issue basically requires perfectly matched tdesc between gdbserver and IPA on all architectures, so a more generic mechanism is in order. I think I will just stuff all possible tdescs for a target in an array and pass the tdesc index to IPA via a global variable.
25 sty 2016 3:34 PM Antoine Tremblay <antoine.tremblay@ericsson.com> napisaÅ(a):
>
>
>
> On 01/24/2016 07:12 AM, Marcin KoÅcielnicki wrote:
>
> > +void
> > +initialize_low_tracepoint (void)
> > +{
> > +Â unsigned long hwcap = getauxval (AT_HWCAP);
>
> You might consider also using proc if getauxval is not available ?
>
> unsigned long hwcap = 0;
>
> #ifdef HAVE_GETAUXVAL
> ÂÂ hwcap = getauxval (AT_HWCAP);
> #else
> ÂÂ unsigned long data[2];
> ÂÂ FILE *f = fopen ("/proc/self/auxv", "r");
>
> ÂÂ if (f == NULL)
> ÂÂÂÂ return;
>
> ÂÂ while (fread (data, sizeof (data), 1, f) > 0)
> ÂÂÂÂ {
> ÂÂÂÂÂ if (data[0] == AT_HWCAP)
> ÂÂÂÂÂÂÂ {
> ÂÂÂÂÂÂÂÂÂ hwcap = data[1];
> ÂÂÂÂÂÂÂÂÂ break;
> ÂÂÂÂÂÂÂ }
> ÂÂÂÂ }
>
> ÂÂ fclose (f);
>
>
> Regards,
> Antoine
>