Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Keith Seitz <keiths@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] More wrappers in varobj
Date: Mon, 15 Oct 2001 15:42:00 -0000	[thread overview]
Message-ID: <3BCB662E.7080108@cygnus.com> (raw)
In-Reply-To: <Pine.GSO.4.33.0110151334560.11434-100000@makita.cygnus.com>

> On Mon, 15 Oct 2001, Andrew Cagney wrote:
> 
> 
>> have a look at breakpoint.c:gdb_breakpoint for a more robust / current
>> way of implementing these wrappers.
> 
> 
> Am I to presume that we are deprecating wrapper.[ch] in favor of this new
> mechanism? If so, I could just work to get rid of wrapper.[ch]
> altogether...
> 
> Just say the word.
> Keith

Should the code live in wrapper.[hc]?  It can for now.

While it is a hack (the code it calls should always unwind the stack 
cleanly) it, or something like it, is going to remain around for a long 
time.  It is also an internal interface (varobj | core-gdb) rather than 
a libgdb interface.

Regarding the problems, the worst is the cast in:

	catch_errors ((catch_errors_ftype*)wrap_function, ...)

with

	wrap_function (char *a)

it isn't valid C - you can't assume that a ()(void*) function is called 
the same way as a ()(char*) function.

The other two are not so much of a concern (although I must admit a 
desire to avoid the unions and use structs so that the compiler can be 
used to check that parameter passing).  catch_exceptions() makes it 
possible for the wrapped functions to return well defined values - 
something not possible with catch_errors().

Andrew



  reply	other threads:[~2001-10-15 15:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.GSO.4.33.0110151245240.11434-100000@makita.cygnus.com>
2001-10-15 13:31 ` Andrew Cagney
2001-10-15 13:36   ` Keith Seitz
2001-10-15 15:42     ` Andrew Cagney [this message]
2001-10-19 11:41   ` Keith Seitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BCB662E.7080108@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=keiths@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox