Fix parsing of <MULTIPLE> breakpoints.
commit3386c5bea59b9b2cdb523b16ff01401fc2e5158a
authorJohannes Sixt <j6t@kdbg.org>
Sun, 18 Nov 2012 20:18:53 +0000 (18 21:18 +0100)
committerJohannes Sixt <j6t@kdbg.org>
Sun, 18 Nov 2012 20:18:53 +0000 (18 21:18 +0100)
tree298699cc3e66a9078888e9eaa33e7d096de6aabc
parent556b9a216f514faae7ddeb712ebb4a1bfa28c929
Fix parsing of <MULTIPLE> breakpoints.

When a breakpoint is set in a template function that is instantiated more
than once, then GDB inserts a breakpoint in each instance. The breakpoint
list looks like this:

Num     Type           Disp Enb Address            What
1       breakpoint     keep y   <MULTIPLE>
1.1                         y     0x0000000000400b94 in Templated<int>::Templated(int) at multibrkpt.cpp:9
1.2                         y     0x0000000000400c14 in Templated<double>::Templated(double) at multibrkpt.cpp:9

KDbg parses this list somehow, but it does not recognize the multiplicity
of the breakpoint; it keeps a breakpoint record for each of the lines. This
eventually grows the breakpoint list each time the session is loaded.

Fix the parser to understand these breakpoints. Location information is
filled in from the first real breakpoint instance.
kdbg/gdbdriver.cpp
kdbg/testprogs/.gitignore
kdbg/testprogs/Makefile
kdbg/testprogs/multibrkpt.cpp [new file with mode: 0644]