This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Re : Debugging v8plus binaries on solaris
Mark Kettenis wrote On 02/17/06 15:31,:
>>Date: Fri, 17 Feb 2006 14:51:31 -0800
>>From: Olatunji Ruwase <Olatunji.Ruwase@Sun.COM>
>
>
> Sorry, I spent most of the week in bed/on the couch in front of the
> telly with a bad flu :(. I had a first glance at it last week, but
Nice to have you back :).
> I'm afraid it needs a bit more work.
I suspected it would, this is my first stab at gdb development, and
the architecture of the code is still a bit fuzzy to me.
>
> For one thing, I think it's important to split the generic v8plus
> target support out from the Solaris v8plus native support. And
> concentrate on the target support first. The seperation is mostly
> already there (*-tdep.c versus *-nat.c), but some of the Solaris
> native "weirdness" (which I realize is necessary for backwards
> compatibility) has crept into the target support.
>
> Looking from an OS agnostic point onto the v8plus support code, I
> really think v8plus should be a seperate architecture much in the same
> way existing 64-bit support is seperate from the 32-bit support. Of
> course this v8plus architecture should reuse as much code from the
> existing 32-bit code as possible, and if the 32-bit code can be
> generalized to work for v8plus as well, that's great, but I think
> constructs like
>
> if (sparc_v8plus)
> {
> ...
> }
> else
> {
> ...
> }
>
Most of my changes to the target support (sparc-tdep.c) are wrapped in
the above construct. sparc32 target support assumes that registers are
4 bytes. One way to eliminate the "if (sparc_v8plus)" is to rewrite
the code to also support 8 byte registers, while making sure that data
is only written and read from the low 4 bytes. However this proposed
change will not work for sparc32_register_type(), but should work for
all other cases. Will this be an acceptable complexity in the target
support code ?. If not I will start moving all the changes into
sparc32plus-* files.
> should be avoided. I also think the xregset stuff should be moved
> into Solaris-specific files, perhaps even into Solaris-specofic
> *-nat.c files. This depends a bit on how v8plus core dumps look. If
> they have the xregset stuff too, the code should probably be moved to
> sparc-sol2-tdep.c or sparc64-sol2-tdep.c.
Yes the v8plus core dump has xregset stuff in it. And I now see why
these changes need to be restricted to solaris specific files.
>
> Is the v8plus ABI documented somewhere?
Unfortunately I dont think it is, I cant find any :(.
Thanks
tunji
>
> Mark