Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Stu Grossman <grossman@juniper.net>
To: Mark Kettenis <kettenis@science.uva.nl>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Patches for FreeBSD 4.2
Date: Thu, 12 Jul 2001 14:58:00 -0000	[thread overview]
Message-ID: <15182.7531.854668.426294@gundor.juniper.net> (raw)
In-Reply-To: <s3izoa9fswj.fsf@soliton.wins.uva.nl>

Mark Kettenis writes:
 > Stu Grossman <grossman@juniper.net> writes:
 > 
 > > Here is a set of patches that fixes a bunch of problems (and some testsuite
 > > failures) for FreeBSD 4.2.
 > 
 > Thanks.  A few comments about the things that fall on my turf:
 > 
 > > + 	* i386-tdep.c (i386_store_return_value):  Make sure that floats get
 > > + 	stored at the top of the FP stack.
 > 
 > Already fixed :-).

Ahh, cool!

 > 
 > > + 	* i386-freebsd-nat.c:  New file to support FreeBSD specific stuff.
 > 
 > * I'd prefer the name i386fbsd-nat.c, since we already have
 >   alphafbsd-tdep.c.

Actually, I was following the linux convention (xxx-linux-yyy.c).  But, I can
fix it.

As an aside, it would be nice to use a consistent file naming convention
throughout GDB.  So far, we have <mach><os>-nat/tdep, or <mach>-<os>-nat/tdep.
Mostly, files seem to use the latter convention unless it's one of the BSDs, in
which case they use the former.  Picking one convention and sticking to it
would make things cleaner.

 > * This file won't compile on FreeBSD 3.x, since <machine/sigframe.h>
 >   doesn't exist.

I'll try to clean that up for 3.x.  It looks like in 3.x and earlier, struct
sigframe was in <machine/frame.h>.

 > Besides, the implementation of a *_frame_saved_pc
 >   function belongs in a target-dependent file, and shouldn't depend on
 >   the target headers.  What's wrong with the old implementation?

I disagree.  *_frame_saved_pc is inherently native dependent for most OS's as
it involves looking at some kind of OS specific signal context structure.

 >   Hmm, `struct sigcontext' has been changed.  The CVS logs in the
 >   FreeBSD tree seems to imply that it is possible to distinguish
 >   between a new and an old signal handler frame.  So perhaps we can
 >   distinguish between the two.  Otherwise we have to provide different
 >   implementations for old and new FreeBSD versions.

I think you are stuck with different versions of GDB anyway.  3.4 seems to have
two versions of sigcontext (the old one is called `osigcontext').  Sigcontext
is pretty much the same as the 4.2 version.  In any case, I don't see a good
way to distinguish between the two versions of sigcontext.  In addition, I
doubt that core files are compatible between 3.4 and 4.2.  So, it really looks
like you want different builds of GDB for each OS version.

 > * I think the SOFTWARE_SINGLE_STEP_P stuff can be removed from your
 >   version of child_resume.

That is only used for an internal consistency check, which I think is valuable
here.

 > > + 	* config/i386/tm-fbsd.h:  Define FRAME_SAVED_PC to use FreeBSD specific
 > > + 	code to extract return PC from signal frames.
 > > + 	* Define FRAME_CHAIN_VALID to use func_frame_chain_valid, since ELF
 > > + 	doesn't generate N_TEXT object file markers.
 > > + 	* Remove SIGTRAMP_START and SIGTRAMP_END.  Move all of that logic into
 > > + 	a FreeBSD specific function invoke via IN_SIGTRAMP.
 > 
 > Why did you comment out USE_STRUCT_CONVENTION here?  AFAIK FreeBSD
 > uses the old GCC 1 conventions for passing short structs.

Brain fart.  You are right, that needs to be left in for FreeBSD.

			Stu


  reply	other threads:[~2001-07-12 14:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-10 23:39 Stu Grossman
2001-07-11  8:46 ` Andrew Cagney
2001-07-11  9:18   ` Stu Grossman
2001-07-12 13:50 ` Mark Kettenis
2001-07-12 14:58   ` Stu Grossman [this message]
2001-07-13  8:16     ` Mark Kettenis
2001-07-12 16:51   ` Stu Grossman

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=15182.7531.854668.426294@gundor.juniper.net \
    --to=grossman@juniper.net \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kettenis@science.uva.nl \
    /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