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 c++/15468] crash breakpoint.c:5940: internal-error: print_one_breakpoint_location


https://sourceware.org/bugzilla/show_bug.cgi?id=15468

Spencer Baugh <spencerbaugh at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |spencerbaugh at gmail dot com

--- Comment #5 from Spencer Baugh <spencerbaugh at gmail dot com> ---
This can also be triggered through normal usage of multiple inferior debugging.

With any typical C++ program (such as hello.cc at the end of this comment) the
following sequence of commands...

(gdb) catch throw                                                               
(gdb) add-inferior -copies 2 -exec hello                                        
(gdb) infe 2                                                                    
(gdb) break main                                                                
(gdb) run                                                                       
(gdb) infe 3                                                                    
(gdb) run                                                                       
(gdb) info break                                                                

...will trigger this error:
breakpoint.c:6384: internal-error: print_one_breakpoint_location: Assertion
`b->loc == NULL || b->loc->next == NULL' failed.

It's key that the catchpoint is set before the inferiors are created. Whenever
the catchpoint is pending before multiple C++ inferiors come into existence,
this error will happen. 

hello.cc:
#include <iostream>
int main() { std::cout << "Hello World!" << std::endl; }

-- 
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]