Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@cygnus.com>
To: RDBrown@mira.net, RodneyBrown@mynd.com, gdb-patches@sources.redhat.com
Subject: Re: PATCH: gdb/corefile.c (0401 snap on HP-UX).
Date: Mon, 09 Apr 2001 10:17:00 -0000	[thread overview]
Message-ID: <1010409171714.ZM10166@ocotillo.lan> (raw)
In-Reply-To: <E14mbKs-000059-00@urtur>

On Apr 9, 11:04pm, RDBrown@mira.net wrote:

> gdb/corefile.c was failing to compile with a missing declaration for
> `symfile_objfile'. This allows gdb to build, but still hangs when 
> starting the child process.
> 
> 2001-04-09  Rodney Brown  <RBrown64@csc.com.au>
> 
> 	* corefile.c: Include symfile.h and objfiles.h to declare
> 	symfile_objfile when HPUXHPPA.
> 
> --- gdb/corefile.c.orig	Mon Apr  9 18:45:13 2001
> +++ gdb/corefile.c	Mon Apr  9 18:02:21 2001
> @@ -34,6 +34,10 @@
>  #include "gdbcore.h"
>  #include "dis-asm.h"
>  #include "gdb_stat.h"
> +#ifdef HPUXHPPA
> +#include "symfile.h"
> +#include "objfiles.h"
> +#endif
>  
>  /* Local function declarations.  */

I'd prefer to see a somewhat different solution.

The reason that symfile_objfile is undefined for HP is because of the
following code in core_file_command():

	/* Yes, we were given the path of a core file.  Do we already
	   have a symbol file?  If not, can we determine it from the
	   core file?  If we can, do so.
	 */
#ifdef HPUXHPPA
	if (symfile_objfile == NULL)
	  {
	    char *symfile;
	    symfile = t->to_core_file_to_sym_file (filename);
	    if (symfile)
	      {
		char *symfile_copy = xstrdup (symfile);

		make_cleanup (xfree, symfile_copy);
		symbol_file_add_main (symfile_copy, from_tty);
	      }
	    else
	      warning ("Unknown symbols for '%s'; use the 'symbol-file' command.", filename);
	  }
#endif

The code controlled by the above ifdef looks pretty generic and it seems
to me that it could be useful on targets other than HP.  I suggest that
we do one of two things:

    1) Enable it for all targets and add Rodney's #include statments
       unconditionally.

    2) Remove it entirely.

I'm not familiar enough with the code in question to know what the best
course of action is.

Kevin


  reply	other threads:[~2001-04-09 10:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-09  6:03 RDBrown
2001-04-09 10:17 ` Kevin Buettner [this message]
2001-04-10 17:46   ` J.T. Conklin
2001-04-12  9:40     ` J.T. Conklin
2001-04-09 10:24 ` J.T. Conklin
2001-04-10 16:14   ` Daniel Berlin
2001-04-10 17:51     ` J.T. Conklin
2001-04-10 21:06       ` Daniel Berlin

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=1010409171714.ZM10166@ocotillo.lan \
    --to=kevinb@cygnus.com \
    --cc=RDBrown@mira.net \
    --cc=RodneyBrown@mynd.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