[haiku-bugs] Re: [Haiku] #9773: Add exception breakpoint support

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Sat, 08 Jun 2013 12:14:39 -0000

#9773: Add exception breakpoint support
-------------------------------------+----------------------------
   Reporter:  bonefish               |      Owner:  anevilyak
       Type:  enhancement            |     Status:  in-progress
   Priority:  normal                 |  Milestone:  Unscheduled
  Component:  Applications/Debugger  |    Version:  R1/Development
 Resolution:                         |   Keywords:
 Blocked By:  9713                   |   Blocking:
Has a Patch:  0                      |   Platform:  All
-------------------------------------+----------------------------

Comment (by bonefish):

 Replying to [comment:6 anevilyak]:
 > A question: on gcc2, {{{__throw}}} is defined in libroot and nowhere
 else. However, on gcc4, we have {{{__cxa_throw}}} defined in both libroot
 and libstdc++. Is that deliberate, and if so, is there a particular rule
 as to when each will be called? In my quick tests it seems to consistently
 be the libstdc++ variant but that's hardly conclusive.

 On gcc 2 the C++ runtime support comes with libgcc and is therefore built
 into libroot. On gcc 4 the C++ runtime support comes with libsupc++.
 Anything that is statically linked against libsupc++ (including libroot)
 may include parts of the C++ runtime. You'll probably have to handle the
 respective functions like any other function and set breakpoints in all
 instances. IIRC they are weak, so the runtime loader chooses exactly one
 of them to be used. I.e. in theory you could determine which one that is.
 Since there is no interface/API that provides this information, the only
 way to do that would be to emulate the runtime loader's algorithm. The
 first option seems easier to implement and more robust though.

--
Ticket URL: <http://dev.haiku-os.org/ticket/9773#comment:7>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: