This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
RE: [RFA/RFC] blockframe.c Fix errorneous addr check
- From: Andrew Volkov <Andrew dot Volkov at transas dot com>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: gdb-patches at sources dot redhat dot com, jimb at redhat dot com,ezannoni at redhat dot com
- Date: Thu, 27 Jun 2002 22:08:31 +0400
- Subject: RE: [RFA/RFC] blockframe.c Fix errorneous addr check
>On Thu, Jun 27, 2002 at 09:13:41PM +0400, Andrew Volkov wrote:
>> Hi,
>>
>> This patch fix wrong detection of belonging addr to startup file:
>> if call main is last instuction in crt0, then
>> inside_entry_file erroneously return false.
>>
>> Ok to commit?
>> Andrey
>>
>> P.S. Possible this bug not in this func, but in symbol reader.
>
>I'm inclined to believe the bug is in the symbol reader. Upper PC
>bounds are generally exclusive - first address after the function.
>
>--
>Daniel Jacobowitz Carnegie Mellon University
>MontaVista Software Debian GNU/Linux Developer
>
Daniel you're right, this bug in coffread.c(complete_symtab) function,
rather, in invalid calculating of current_source_end_addr:
current_source_end_addr = start_addr + size;
but must be:
current_source_end_addr = start_addr + size + <addr sizeof>;
As I understand, since machine address size is not known at time of parsing
coff file, then we have big trouble :(.
Comments/suggestions?
Andrey