From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12387 invoked by alias); 6 Jun 2009 15:50:02 -0000 Received: (qmail 12342 invoked by uid 22791); 6 Jun 2009 15:50:01 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.156) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 06 Jun 2009 15:49:55 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.2/jtpda-5.5pre1) with ESMTP id n56Fnqvg020089 for ; Sat, 6 Jun 2009 17:49:52 +0200 (CEST) Received: from mailserver.u-strasbg.fr (ms1.u-strasbg.fr [IPv6:2001:660:2402:d::10]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id n56Fnqlq047021 for ; Sat, 6 Jun 2009 17:49:52 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) Received: from d620muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id n56Fnp7m017835 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Sat, 6 Jun 2009 17:49:52 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) From: "Pierre Muller" To: Subject: [RFA] Fix bug in add_alias_cmd Date: Sat, 06 Jun 2009 15:50:00 -0000 Message-ID: <006001c9e6be$6fad8fb0$4f08af10$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00150.txt.bz2 Out of curiosity, I tried to start gdb with --xdb options to see the special options that this provides. I got this: $ ./gdb -xdb ../../purecvs/gdb/cli/cli-decode.c:255: internal-error: add_alias_cmd: Assertion `!aliases && !prehook && prehookee && !posthook && ! posthookee' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) [answered Y; input not from terminal] ../../purecvs/gdb/cli/cli-decode.c:255: internal-error: add_alias_cmd: Assertion `!aliases && !prehook && prehookee && !posthook && ! posthookee' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Create a core file of GDB? (y or n) [answered Y; input not from terminal] Aborted (core dumped) This is due to "bu" being an alias command of "ubreak" for xdb options, but "ubreak" doesn't seem to exist anywhere and I found no trace of it anywhere is the sources :( I fact after looking at the sources, it appears to me that the assertion itself is wrong. prehookee should also be NULL, as the other pointers tested. This small patch fixes it. Tested on complier farm without regression. OK to commit? Pierre Muller Pascal language support maintainer for GDB PS: What should we do about Could I also remove that line if (xdb_commands) { add_com_alias ("ba", "break", class_breakpoint, 1); add_com_alias ("bu", "ubreak", class_breakpoint, 1); } 2009-06-06 Pierre Muller * cli/cli-decode.c (add_alias_cmd): Correct assertion. Index: src/gdb/cli/cli-decode.c =================================================================== RCS file: /cvs/src/src/gdb/cli/cli-decode.c,v retrieving revision 1.79 diff -u -p -r1.79 cli-decode.c --- src/gdb/cli/cli-decode.c 12 May 2009 16:51:13 -0000 1.79 +++ src/gdb/cli/cli-decode.c 6 Jun 2009 11:18:08 -0000 @@ -251,7 +251,7 @@ add_alias_cmd (char *name, char *oldname &prehook, &prehookee, &posthook, &posthookee); /* If this happens, it means a programmer error somewhere. */ - gdb_assert (!aliases && !prehook && prehookee + gdb_assert (!aliases && !prehook && !prehookee && !posthook && ! posthookee); return 0; }