This is the mail archive of the gdb-patches@sources.redhat.com 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: [patch] remove deprecated core support from QNX NTO



M.M. Kettenis wrote:


regs since our kernel just uses the opcode to push them in the normal order. Unfortunately though, our gpregs are in a different order and not all of them are there so we have some unique mappings.



QNX NTO is in no way special about this. I was thinking about something
like the attached patch. Could you test that one? This approach simply
reduces the amount of code needed.



Looks good. I didn't know the i386-tdep had the mapping ability. Do other arches have that as well? I'm assuming you meant to return the value here:


static int
nto_reg_offset (int regnum)
{
 if (regnum >= 0 && regnum < ARRAY_SIZE (i386nto_gregset_reg_offset))
    i386nto_gregset_reg_offset[regnum];
^^^^ return?
 return -1;
}

When I run an app, it's dumping core in i386_supply_gregset because tdep->regset is not initialized. Not quite sure what the proper way to do that is. Still investigating.

The patch also contains a unrelated change to the shared library code.
It also removes a unneeded function. But it'd be nice if you could test
that I didn't mess things up.



Thanks for all the help Mark. I'm always a big fan of eliminating redundant code.


cheers,

Kris


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