On 27 Jun 2011, at 9:27 AM, yoni londner wrote:
> As you know, on 32bit systems, when using EBP for anything other than holding 
> the stack base, it is very difficult to get reasonable backtrace.
> this can be fixed if directing the compiler to add a debug record which tells 
> (at runtime) where we keep EBP value.
> So, I added this record (FPO in ml.exe and cfi in gcc), and now we can 
> debug/get backtrace at runtime.
> I also fixed source file name, so gdb find's it.
> Patch is attached (against openssl-1.0.0d.tar.gz), and I hope you will merge 
> it to trunk.

This seems like a good thing to fix.

I have some questions/comments:

1. Would it be better to use ".cfi_startproc simple"? The GAS documentation 
doesn't actually say what opcodes are emitted by cfi_startproc vs. simple (and 
I haven't taken the time to check), but I'd expect a frameless leaf procedure 
like this one not to want the default opcodes emitted for a normal procedure. I 
could be wrong.

2. We could add .cfi_offset directives for the other callee-saved registers as 
well (EBX, ESI, EDI).




______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to