From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Received: (qmail 19897 invoked from network); 11 Jan 2003 20:42:53 -0000 Received: from unknown (HELO localhost.redhat.com) (24.157.209.173) by 209.249.29.67 with SMTP; 11 Jan 2003 20:42:53 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 082293ED8; Sat, 11 Jan 2003 15:42:44 -0500 (EST) Message-ID: <3E2081C3.1080504@redhat.com> Date: Sat, 11 Jan 2003 20:42:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.1) Gecko/20021211 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: [unwind-20030108-branch] Add sentinel-frame + misc References: <3E1E2D1B.5020100@redhat.com> <3E1E6C23.8050407@redhat.com> <20030110213400.GA8623@nevyn.them.org> <3E205F17.3060906@redhat.com> <20030111183437.GB1930@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-01/txt/msg00458.txt.bz2 > It's hardly a bug; more of a deep interface shortcoming. Consider: Which is a bug. > File A declares a type 'struct foo'. > File B declares a type 'struct foo'. > Header C forward declares 'struct foo;' and 'struct foo *get_foo ()'. > File D includes Header C and uses 'get_foo'. > > I'm sitting in File D, and I want to look in the debugger at this > opaque unwind cache. There's no possible way to associate it with > either struct foo. > > That's why I think the construct should be avoided; if one of them is > A_foo and the other is B_foo, and we do a bit of casting, then at least > I can dump the one I want. Shouldn't something like: ('File A:struct foo' *) get_foo() work? Even: (gdb) list 'File A' (gdb) print *(struct foo) get_foo() How does GDB differentiate between variables and enum's when they have multiple declarations? Andrew