Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Petr Sorfa <petrs@caldera.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: "gdb-patches@sources.redhat.com" <gdb-patches@sources.redhat.com>
Subject: Re: [PATCH] DW_AT_calling_convention support REV 2
Date: Wed, 10 Jul 2002 14:06:00 -0000	[thread overview]
Message-ID: <3D2C9B83.94D00EA6@caldera.com> (raw)
In-Reply-To: <20020710193458.GA28939@nevyn.them.org>

Hi,

> > Good, I agree, that makes it more generic. Need to check for
> > check_symbol for NULL as this might tank GDB at the second if.
> 
> Why should NULL be a legitimate argument?  Calling the function without
> a symbol is useless...
Just error trapping. In case something goes wrong and a NULL pointer
gets accidentally passed.

> > > And then change all callers of get_main_name () to use this.
> > >
> > > (Note that this requires being careful if symbol_of_main gets
> > > unloaded and we load a C program afterwards!)
> > >
> > > Make sense?  Sound reasonable?
> > Um, you've lost me. There is no get_main_name() function, do you mean
> > get_main_symbol() or main_name()? I still not sure what the callers of
> > the function should do.
> 
> main_name(), I assume.  Basically I would like everywhere that
> currently checks by a strcmp/STREQ with main_name() to use
> is_main_symbol () instead, etc.  Things that call lookup_symbol on
> main_name() should just use get_main_symbol () if possible.  Then
> set_main_name () could include calling lookup_symbol(main_name()), so
> that get_main_symbol would always be valid, etc....
Ok, got it.

> > Although, I do agree that the patch should catch unloading the
> > main_symbol, but how?
> 
> I'm not sure :(  Is there a hook for when object files are unloaded?
Nope. In the cu_header patch, I have a hook from elfread.c to
dwarf2read.c to clear up stuff when a new program is about to be
debugged. The function will be called dwarf_init (). But as for a
generic solution..

Petr


  reply	other threads:[~2002-07-10 20:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-10 11:41 Petr Sorfa
2002-07-10 11:47 ` Daniel Jacobowitz
2002-07-10 12:32   ` Petr Sorfa
2002-07-10 12:41     ` Daniel Jacobowitz
2002-07-10 14:06       ` Petr Sorfa [this message]
2002-07-11  8:07       ` Petr Sorfa
2002-07-11  9:22         ` Daniel Jacobowitz

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=3D2C9B83.94D00EA6@caldera.com \
    --to=petrs@caldera.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.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