This is the mail archive of the gdb-prs@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]

[Bug mi/14030] No children returned for unitialized pointer to class


http://sourceware.org/bugzilla/show_bug.cgi?id=14030

--- Comment #3 from Anton <xgsa at yandex dot ru> 2012-05-12 16:50:59 UTC ---
Unfortunately I cannot reproduce the problem with gdb HEAD and gcc-4.6.3. I see
the children even if I set the breakpoint on pCUT declaration (certainly they
have random values before initialization).  I still have children after pCUT is
initialized and even after "0" assignment.

I am not sure, but it could be a gcc-specific behavior. Could you try a newer
gcc?

Otherwise we could try to reproduce the problem without relying on
uninitialized variable (which could give us random effect). E.g. is the problem
is reproducible in your environment if client() will looks like this:

void client()
{
  ClassUnderTest *pCUT = 0;   // Initialize variable to avoid random effect
  pCUT = new ClassUnderTest;  // breakpoint here -> 0 children,
stepping to next line does not help
  delete pCUT;                               // breakpoint here -> OK
  pCUT = 0;
}

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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