discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question for gdb users...


From: Richard Frith-Macdonald
Subject: Re: question for gdb users...
Date: Thu, 24 Sep 2009 08:16:07 +0100


On 24 Sep 2009, at 04:40, Matt Rice wrote:

there is some discussion here about removing the convenience mechanism
that allows
you to go

break foo
where foo then turns into -[class foo]

this causes lots of issues which are fairly hard to fix in gdb,
which is why the whole 'break main' with recent gdb causes issues. because of
[NSThread main].

if you guys opposed to it please let me know and I will relay it into
the gdb thread,
I for one wasn't even aware of this feature until it started causing problems

http://sourceware.org/ml/gdb-patches/2009-09/msg00734.html
here is the thread.

I use this feature tens of times a day, perhaps more ... it's actually almost the only way I set breakpoints (though I occasionally set breakpoints at particular lines or in C functions).

Now, it's not obvious, from a quick read of the thread, why there is a specific problem with objc ... though it seems to imply that objc is a special case and this feature is fine in C++ and desired in pascal and ada.

I don't mind using the 'break [class method]' syntax where I know that the implementation of the method is in one particular class, but *usually* I don't know which class I want to break in (because I'm not aware of all the libraries/subclasses that might be involved).

If the underlying problem is one of confusion between objc methods and C functions (the example of the confusion between the main() function and the [NSThread-main] method suggests that this may be the case) then perhaps it could be resolved using a modification of the square brackets syntax ...

at present we have:

+[class method] a factory method of a specific class
-[class method]   in instance method in a particular class
[class method] either a factory method or an instance method, with an option to choose if both exist

and could add:

+[method]       a factory method of any class
-[method]   in instance method in any class
[method]  either a factory method or an instance method,

So 'break [method] would be like the current 'break method' syntax but 'method' would be treated *only* as an ObjC method name, never as a function or method in another language.

If this would help resolve the issue, it would satisfy me. Simply losing the ability to set a breakpoint in any class would not.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]