Hi Shaunak,
Thanks for the reply. Actually I got the
answer from the GDB forum. It turns out that this is not DDD but GDB issue.
This is what GDB has to say about it:
It is possible that a breakpoint corresponds to several locations in
your program. Examples of this situation are:
* For a C++ constructor, the GCC compiler generates several instances of the
function body, used in different cases.
* For a C++ template function, a given line in the function can correspond to
any number of instantiations.
* For an inlined function, a given source line can correspond to several places
where that function is inlined.
In all those cases, GDB will insert a breakpoint at all the relevant
locations(4).
A breakpoint with multiple locations is displayed in the breakpoint table using
several rows--one header row, followed by one row for each breakpoint location.
The header row has `<MULTIPLE>' in the address column. The rows for
individual locations contain the actual addresses for locations, and show the
functions to which those locations belong. The number column for a location is
of the form breakpoint-number.location-number.
For example:
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE>
stop only if i==1
breakpoint already hit 1 time
1.1 y 0x080486a2 in void foo<int>() at t.cc:8
1.2 y 0x080486ca in void foo<double>() at t.cc:8
Each location can be individually enabled or disabled by passing
breakpoint-number.location-number as argument to the enable and disable
commands. Note that you cannot delete the individual locations from the list,
you can only delete the entire list of locations that belong to their parent
breakpoint (with the delete num command, where num is the number of the parent
breakpoint, 1 in the above example). Disabling or enabling the parent
breakpoint (see section 5.1.5 Disabling Breakpoints) affects all of the
locations that belong to that breakpoint.
---------------------------------------------------------
This perfectly explains my problem and provides the solution too.
Thanks once again for the response.
Regards,
Inder
From:
shaunak saha [mailto:address@hidden
Sent: 17 July 2009 18:14
To: Inder
Pal Singh
Cc: address@hidden
Subject: Re: Problem debugging C++
code in DDD
Can you please provide more details, like the environment you are using
and the DDD version
And are you able to debug the same application properly in gdb?
On Fri, Jul 17, 2009 at 9:28 AM, Inder Pal
Singh <address@hidden>
wrote:
Hi,
I
have a C++ code which I an trying to debug using DDD. I am using g++ compiler.
Now, when I put a breakpoint at any line in the code, I see that multiple
breakpoints automatically get generated at the same line. Also, when I do
"info breakpoints", I see that the "address" filed displays
"<MULTIPLE>" instead of the address location. Moreover, if the
breakpoint number is say 8, then the additional breakpoints are number 8.1,
8.2, 8.3 etc.
Because
of these multiple breakpoints, the "next" and "step"
commands take forever to cover all the breakpoints and move to the next line in
the code. All the additional breakpoints give the same line number but have
different addresses.
Can
you please tell me how I can get rid of these additional breakpoints?
Thanks
Shoker
_______________________________________________
ddd mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/ddd