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] i386nbsd_pc_in_sigtramp robustness


On Mon, Sep 02, 2002 at 11:39:05PM +0200, Mark Kettenis wrote:

 > Just a few thoughts:
 > 
 >  * Doesn't this break things for NetBSD before 1.4?  Did you consider
 >    falling back on the old method?

The old method didn't work on 1.3 anyway, because the VM layout was
different then, i.e the sigtramp start/end were different.  I could
add a disassemble-using version for 1.3, but it hardly seems worth
it at this point.

Heh, just checked, and FWIW, the old method didn't work for 1.4, either;
it used the same VM layout as 1.3.  The VM layout was changed between
1.4 and 1.5; the new VM layout also was in 1.4.2 and 1.4.3.

1.4 did, however, have a slightly different signal trampoline (which
changed based on a kernel option).  I'm going to file a PR to remind
me to audit all of the signal trampoline stuff back to NetBSD 1.4.

 >  * Did you notice any effect on performance?  Reading from a target's
 >    memory can be time-consuming for remote targets.

It certainly didn't seem any slower on my Athlon :-)  Yes, I know reading
memory is time-consuming for remote targets, however, there isn't really
any other sane way to do it, since the VM layout is totally arbitrary and
can be changed by the user.  I'll note that i386-linux also uses the
disassemble method.

Also note that the use of the disassemble-method is going to fade over
time, since post-1.6 NetBSD now uses symbol names to find the trampoline.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>


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