Re: [PATCH 6/8] gdbserver/s390: Add fast tracepoint support.

Marcin Kościelnicki
2016-02-19T13:41:46Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 1347 bytes --]

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
>
\x16º&Öéj×!zÊÞ¶êç×o{ÓÙb²Ö«r\x18\x1dn–­r\x17¬