This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA]: Fix crashing bug in set follow-fork-mode


I could not find a way to automate this in the testsuite in such a way
that it would catch even most of the test cases.

On Fri, 21 Apr 2000, Andrew Cagney wrote:

> "Daniel Berlin+list.gdb-patches" wrote:
> 
> That, separatly, may not hurt (it's up to Fernando).  I'm not sure about
> the ``isalphanum()'' I wonder what happens when it gets
> internationalized and the check works in part by good luck.  Personally,
> I'd like to see a simpler interface.
The check will never work by good luck.
People shouldn't have non-alphanumeric characters in enums, no matter
what language.
In multibyte character languages, isalnum will still work. Unless your
c compiler isn't following the standard.
It's mandated that isalnum is locale specific, not implementation defined.
ISO C TC2 did this.
Then again, i'm kinda pulling this portion out of my ass, so feel free to
correct me. :P

> 
> The testsuite should still be checking that the commands it expects are
> there.  Otherwize  (as we've done once or twice ....) we  run the risk
> of loosing commands / changing interfaces between releases :-(

Depending on your OS, without this patch, you will see the problem
manifested in various different ways.
It might say the command is ambiguous
It might crash.
It might work fine.
It might decide to destroy various pieces of memory, and manifest itself
as a completely different bug.
The testsuite would point in the completely wrong direction, and you'd go
chasing down the wrong path. With the patch, you know what
the problem is. It tells you, and tells you where to find it.
On my system, help set follow-fork-mode still showed the proper three
choices. But it was still broken.
If you can come up with a testsuite case, go for it.
I just don't think it makes the most sense.
If you want a testsuite case, i can make a maint function that does what
this patch is doing, and we can add a testsuite case that runs the
function, and fails if it outputs anything.
--Dan
 > 
> 	enjoy,
> 		Andrew
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]