From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26201 invoked by alias); 13 Dec 2006 08:46:01 -0000 Received: (qmail 26177 invoked by uid 22791); 13 Dec 2006 08:45:59 -0000 X-Spam-Check-By: sourceware.org Received: from mxout.hispeed.ch (HELO smtp.hispeed.ch) (62.2.95.247) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 13 Dec 2006 08:45:53 +0000 Received: from indel.ch (84-73-11-232.dclient.hispeed.ch [84.73.11.232]) by smtp.hispeed.ch (8.12.11.20060308/8.12.11/taifun-1.0) with SMTP id kBD8jiWr010182 for ; Wed, 13 Dec 2006 09:45:44 +0100 Received: from FABI.indel.ch [192.168.1.91] by indel.ch [127.0.0.1] with SMTP (MDaemon.v2.7.SP5.R) for ; Wed, 13 Dec 2006 09:45:34 +0100 Message-Id: <5.2.0.9.1.20061213092734.01881ec0@NT_SERVER> X-Sender: cenedese@NT_SERVER (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Wed, 13 Dec 2006 08:46:00 -0000 To: gdb@sourceware.org From: Fabian Cenedese Subject: Symbols in same range Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-MDaemon-Deliver-To: gdb@sourceware.org X-Return-Path: cenedese@indel.ch X-Virus-Status: Clean X-DCC-spamcheck-01.tornado.cablecom.ch-Metrics: smtp-04.tornado.cablecom.ch 1377; Body=1 Fuz1=1 Fuz2=1 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-12/txt/msg00112.txt.bz2 Hi Is it correct to have several symbols in the same symtab range? Like: maintenance_print_psymbols: ... Partial symtab for source file N:/Indel-PPC/Tests/gccext3/OS/Inos/Src/Inos_mod.cpp (object 0x95bbb0) Symbols cover text addresses 0x728e0-0xa89e0 Partial symtab for source file N:/Indel-PPC/Tests/gccext3/OS/Inos/Src/Inos_1ms.cpp (object 0x95b148) Symbols cover text addresses 0x1918-0xa74dc Partial symtab for source file N:/Indel-PPC/Tests/gccext3/OS/Inos/Src/Inos.cpp (object 0x9cc548) Symbols cover text addresses 0x1918-0xa7168 Partial symtab for source file N:/Indel-PPC/Tests/gccext3/OS/Inos/Src/Inos_lib.cpp (object 0x95bb00) Symbols cover text addresses 0x71afc-0xa799c ... I think that this is one problem I have for not getting the right line info for a PC. I tried to comment an example here: map file: .startup 0x00098a58 0xf7c N:/Indel-PPC/Tests/gccext3/lib41/libinos.603(Inos.603) 0x00099890 _INI_0200_INOS() 0x00099960 inos_main Find line to pc=0x99928 with find_pc_line: find_pc_line, pc=0x99928 find_pc_sect_line, pc=0x99928 lookup_minimal_symbol_by_pc, pc=0x99928 -> msymbol="_INI_0200_INOS" find_pc_sect_symtab, pc=0x99928 lookup_minimal_symbol_by_pc_section, pc=0x99928 -> msymbol="_INI_0200_INOS" s='Inos_mod.cpp' find_pc_sect_psymtab, pc=0x99928 lookup_minimal_symbol_by_pc_section -> msymbol="_INI_0200_INOS" tpst='Inos_mod.cpp' find_pc_sect_psymbol -> p="CEnd" -> ps='Inos_mod.cpp' -> s='Inos_mod.cpp' best_symtab=NULL -> .line=0 The found msymbol is always correct, but when gdb continues to find the corresponding block it takes the symtab from a wrong file. But the addresses in there don't match (only the range) and the returned result is .line=0. The problem may come because of various code sections. We have code not only in .text but also in different sections like .startup or .cache (for better memory handling on the target). Various source files place code in the different sections which of course get placed together. So it is somehow correct that a source file symtab has a very big range if you only look at the lowest and highest used address. But not the whole range is covered and of course the ranges will almost all overlap. Is this an error in the finding strategy of gdb, like, it should look in all symtabs and not only in the first whose range matches? Or is there a possibility to find the block from the msymbol which is found correctly? Something else I can do to improve my results? Thanks bye Fabi