From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15237 invoked by alias); 19 Nov 2007 04:30:19 -0000 Received: (qmail 15229 invoked by uid 22791); 19 Nov 2007 04:30:18 -0000 X-Spam-Check-By: sourceware.org Received: from mail.intrepid.com (HELO mail.intrepid.com) (74.95.8.113) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 19 Nov 2007 04:30:15 +0000 Received: from screamer.intrepid.com (screamer.intrepid.com [10.10.1.2]) by mail.intrepid.com (8.13.8/8.13.8) with ESMTP id lAJ4UDDf004442 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 18 Nov 2007 20:30:13 -0800 Received: from screamer.intrepid.com (screamer.intrepid.com [127.0.0.1]) by screamer.intrepid.com (8.13.8/8.13.8) with ESMTP id lAJ4UDb1032500 for ; Sun, 18 Nov 2007 20:30:13 -0800 Received: (from gary@localhost) by screamer.intrepid.com (8.13.8/8.13.8/Submit) id lAJ4UCqL032491 for gdb@sources.redhat.com; Sun, 18 Nov 2007 20:30:12 -0800 Date: Mon, 19 Nov 2007 04:30:00 -0000 From: Gary Funck To: GDB List Subject: SGI/Irix: how to call procedure from GDB? Message-ID: <20071119043012.GB23963@intrepid.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00176.txt.bz2 I'm trying to debug a problem in gcc using gdb (6.7.1) on SGI/Irix 6.5. GCC has been compiled with GCC 3.3 with '-g -O0' switches. After hitting a breakpoint, I try executing "p debug_tree(exp)" (via the gcc supplied macro, "pt"), but instead, GDB issues the following somewhat cryptic diagnostic: The program being debugged stopped while in a function called from GDB. When the function (debug_tree) is done executing, GDB will silently stop (instead of continuing to evaluate the expression containing the function call). Any suggestions on what might've happened here, and what I need to do to get GDB to to run the "debug_tree()" procedure? thanks, - Gary (Output excerpted below.) ------------------------- Breakpoint 1, fancy_abort (file=0x10b75720 "/upc/dev/gary/gcc-upc-4-2/src/gcc/expr.c", line=6882, function=0x10b75f58 "expand_expr_real_1") at /upc/dev/gary/gcc-upc-4-2/src/gcc/diagnostic.c:642 642 internal_error ("in %s, at %s:%d", function, trim_filename (file), line); (gdb) up #1 0x1031b788 in expand_expr_real_1 (exp=0x4200230, target=0x0, tmode=DImode, modifier=EXPAND_INITIALIZER, alt_rtl=0x0) at /upc/dev/gary/gcc-upc-4-2/src/gcc/expr.c:6882 6882 || TREE_CODE (exp) == FUNCTION_DECL); (gdb) l 6877 context = decl_function_context (exp); 6878 gcc_assert (!context 6879 || context == current_function_decl 6880 || TREE_STATIC (exp) 6881 /* ??? C++ creates functions that are not TREE_STATIC. */ 6882 || TREE_CODE (exp) == FUNCTION_DECL); 6883 6884 /* This is the case of an array whose size is to be determined 6885 from its initializer, while the initializer is still being parsed. 6886 See expand_decl. */ (gdb) p exp $1 = (tree) 0x4200230 (gdb) pt Breakpoint 1, fancy_abort (file=0x10b75720 "/upc/dev/gary/gcc-upc-4-2/src/gcc/expr.c", line=6882, function=0x10b75f58 "expand_expr_real_1") at /upc/dev/gary/gcc-upc-4-2/src/gcc/diagnostic.c:642 642 internal_error ("in %s, at %s:%d", function, trim_filename (file), line); The program being debugged stopped while in a function called from GDB. When the function (debug_tree) is done executing, GDB will silently stop (instead of continuing to evaluate the expression containing the function call).