This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch] remove deprecated core support from QNX NTO
- From: Kris Warkentin <kewarken at qnx dot com>
- To: "M.M. Kettenis" <m dot m dot kettenis at alumnus dot utwente dot nl>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 23 Dec 2004 11:40:12 -0500
- Subject: Re: [patch] remove deprecated core support from QNX NTO
- References: <73193856100971104@weblx058.utsp.utwente.nl>
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