This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH/commit] Handle errors in tracepoint target agent
- From: Stan Shebs <stan at codesourcery dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org, Stan Shebs <stan at codesourcery dot com>
- Date: Fri, 26 Mar 2010 05:40:42 -0700
- Subject: Re: [PATCH/commit] Handle errors in tracepoint target agent
- References: <4BAC1426.5050003@codesourcery.com> <201003261113.40865.pedro@codesourcery.com>
Pedro Alves wrote:
On Friday 26 March 2010 01:55:50, Stan Shebs wrote:
For the record, here's what I ended up committing.
(For the record, if a patch ends up different to how it was
being discussed, a chance for commenting before checking in
would be really appreciated.)
It seemed uncontroversial, but I guess not. :-)
+ for (p = p1; p < p2; p++)
+ if (!((*p >= '0' && *p <= '9')
+ || (*p >= 'a' && *p <= 'f')
+ || (*p >= 'A' && *p <= 'F')))
+ break;
Oh triple yuck. Let's just make a new utility function - an ishex-type
test shouldn't be coded more than once, or maybe twice, in a program.
If you really insist in handling this in FSF gdb as well,
then I'd like to merge this patch above to head, otherwise,
I'd rather just remove all the plain string handling from
FSF gdb, and put that patch in our tree only. (I don't
really see the point in carrying that workaround forever in
FSF gdb).
Alright alright. My interest in the subject is now totally exhausted,
we'll just do the hex strings here.
Stan