This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: New port: ia64-hp-openvms - the stub


On 02/10/2012 01:43 PM, Tristan Gingold wrote:
> Hi,
> 
> this is the debugger stub for ia64 VMS.
> Because it is independent of gdb (not unlike gdbserver) and because it isn't a one file stub, I think it is worth creating a subdirectory.

Sounds fine to me.

> I think we should also move the existing stubs there.
> 
> The interesting part is that on OpenVMS, the debugger is a shared library that is loaded with the application when debugging is needed (either from the start or during the run - like attach).  Just think about catching SIGTRAP, SIGSEGV, SIGBUS,… from a LD_PRELOAD binary.
> 
> The stub was written from scratch because it is highly OpenVMS dependent and in particular the standard C library shouldn't be used.

> The stub is not complete: some registers are partially or not handled, 

I couldn't really tell, but you may want to consider looking into xml target
descriptions.  At least reporting a description with the openvms osabi would
be good.

and inferior procedure call is not yet implemented (will be the funny part).


But it has already be extremely useful to debug some applications.

It's fine with me to put it in and improve it as we go.  I skimmed
it, but all the dollar signs distract a bit too much.  :-)

OOC,

> +#if 1
> +      /* What a mess.  Gdb and linux expects bsp to point after the current
> +         register frame.  Adjust.  */

What does this mean?  Are we committing to a hack that will make our
lives hard when we want to fix it?

> +      {
> +        unsigned __int64 bsp = intstk->intstk$q_bsp;
> +        unsigned int sof = intstk->intstk$q_ifs & 0x7f;
> +        unsigned int delta = ((bsp >> 3) & 0x3f) + sof;
> +        regs.bsp.v = bsp + ((sof + delta / 0x3f) << 3);
> +      }
> +#else
> +      regs.bsp.v = intstk->intstk$q_bsp;
> +#endif

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]