jayduhon / inferno-os

Automatically exported from code.google.com/p/inferno-os
2 stars 0 forks source link

getcallerpc for gcc on x86 shouldn't assume %ebp #266

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
newer versions of gcc for x86 don't always use a frame pointer,
so getcallerpc implementations shouldn't assume they do.

Original issue reported on code.google.com by Charles....@gmail.com on 25 Jun 2011 at 11:34

GoogleCodeExporter commented 9 years ago
it seems no less reliable to use the same technique as on plan 9, and use the 
parameter to getcallerpc to locate the saved pc in the caller.

lib9/getcallerpc-DragonFly-386.S
lib9/getcallerpc-FreeBSD-386.S
lib9/getcallerpc-Linux-386.S
lib9/getcallerpc-MacOSX-386.s
lib9/getcallerpc-NetBSD-386.S
lib9/getcallerpc-OpenBSD-386.S
lib9/getcallerpc-Solaris-386.s
lib9/getcallerpc-Unixware-386.s
committed changeset 516:48313777c44e

Original comment by Charles....@gmail.com on 29 Jun 2011 at 2:15