[gs-devel] Re: Crash reporting links xefitra

Igor V. Melichev igor.melichev at artifex.com
Mon Aug 27 21:26:15 PDT 2007


Ralph,

> Just 'make debug' 
> and run the file again.

No, this is not sufficient.
Debug and release versions work differently,
and in most case locating indeterministic bug in release 
build can't be done with debug build.

My suggestion is to generate linker map file 
*with*any*build* and to include it into a distribution,
maybe in a compacted form. If we restrict with
function names and addresses, it shouldn't be too big.

But if we want line numbers, 
it is bigger and the linker map is not enough.
In this case we need the full project debug data
with line numbers. I think it will be few megabytes,
and we can't embed it into a printer.

Thus there are 2 ways :

1. Generate a simple C stack trace
based on the linker data included into distribution.

2. Write a raw dump on the user's machine
(or printer), send it to developers,
the developer builds Ghostscript from 
same source with same compiler,
generates the debug database, 
then analyzes the dump with it.
This way won't work if the user runs his own device,
and the failure happens in it.

Igor.



----- Original Message ----- 
From: "Ralph Giles" <ralph.giles at artifex.com>
To: "Igor V. Melichev" <igor.melichev at artifex.com>
Cc: <gs-devel at ghostscript.com>; <tech at artifex.com>
Sent: Tuesday, August 28, 2007 4:02 AM
Subject: Re: [gs-devel] Re: Crash reporting links xefitra


> On Tue, Aug 28, 2007 at 12:09:01AM +0400, Igor V. Melichev wrote:
> 
>> I think there are 2 main problems here :
>> 
>> 1. C stack content is compiler specific.
> 
> Yes. This is why gdb is used on linux, and why Google's breakpad is 
> being developed.
> 
>> 2. Line numbers and function names are not included
>> in release build binaries.
> 
> This is more of a problem. The bug-buddy back traces are still useful 
> because they are usually submitted back to the binary distributor, who 
> as you suggest can retain a symbol table for the relevent binary. We 
> could do that for our windows binaries, but for other platforms we 
> only distribute source. The only advantage may be that it is easier for 
> users to generate stack traces when they find a bug. Just 'make debug' 
> and run the file again.
> 
> (gcc leaves function names in release builds, but Linux distributions 
> often strip these out of their builds to save space.)
> 
> -r



More information about the gs-devel mailing list