From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21954 invoked by alias); 10 Feb 2006 11:25:47 -0000 Received: (qmail 21946 invoked by uid 22791); 10 Feb 2006 11:25:47 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 10 Feb 2006 11:25:43 +0000 Received: from HOME-C4E4A596F7 (IGLD-84-228-136-147.inter.net.il [84.228.136.147]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id DNR62829 (AUTH halo1); Fri, 10 Feb 2006 13:25:24 +0200 (IST) Date: Fri, 10 Feb 2006 11:25:00 -0000 Message-Id: From: Eli Zaretskii To: Nick Roberts CC: gdb-patches@sourceware.org In-reply-to: <17388.13240.975679.344747@kahikatea.snap.net.nz> (message from Nick Roberts on Fri, 10 Feb 2006 19:33:28 +1300) Subject: Re: minimalistic MI catch support Reply-to: Eli Zaretskii References: <17386.57501.980555.996896@kahikatea.snap.net.nz> <17388.13240.975679.344747@kahikatea.snap.net.nz> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00242.txt.bz2 > From: Nick Roberts > Date: Fri, 10 Feb 2006 19:33:28 +1300 > > (gdb) catch catch > Catchpoint 2 (catch) > (gdb) catch throw > Catchpoint 3 (throw) > (gdb) catch fork > Catchpoint 4 (fork) > (gdb) catch exec > Catchpoint 5 (exec) > (gdb) info break > Num Type Disp Enb Address What > 2 breakpoint keep y 0x07dae1aa exception catch > 3 breakpoint keep y 0x07daf001 exception throw > 4 catch fork keep y > 5 catch exec keep y > > The first two are of type breakpoint and their nature is given under the > heading "What". > > The second two have their own type: "catch fork" and "catch exec" (I must > admit that I don't understand how this gives differerent behaviour from using > "break fork" and "break exec"). Also for some reason, they have no address. I think this is a bug (or undocumented misfeature) in breakpoint.c:handle_gnu_v3_exceptions. You will see that it sets the type of the raw breakpoint it creates to bp_breakpoint, instead of using the argument ex_event that is passed by the caller. In addition, for some reason, it forces a special function to be used for printing these catchpoints, and that function (print_one_exception_catchpoint) doesn't use the list of descriptions in the bptypes[] array used by the more general code in print_one_breakpoint. I think it's bad to have more than one place to have these description strings. Can someone explain why we should use special code for gnu_v3 exceptions? As for the address not being printed, can you step with a debugger through the function that prints these breakpoints and see why they are skipped? I cannot for the moment see any reason, just looking at the code.