This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: break on C++ global objects ctors


On Mar 31, 2014, at 10:10 AM, Daniel Gutson <daniel.gutson@tallertechnologies.com> wrote:

> On Mon, Mar 31, 2014 at 10:56 AM,  <Paul_Koning@dell.com> wrote:
>> This certainly should be easily doable, just in gdb.  FWIW, if you start a program with gdbserver and then connect to it from gdb ("target remote" to gdbserver), the program is stopped at the first instruction, way before "main".
> 
> That doesn't solve how gdb detects the beginning of each ctor function.

I don’t know what problem you’re referring to.  A constructor is just a function, which has a name, and you can set a breakpoint on it.  

If for some reason that’s not working, that would be a bug, but I’ve used breakpoints on constructors for a long time and it seems to work when I try it.

	paul


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