From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 82CFD3858C52 for ; Fri, 21 Apr 2023 13:00:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 82CFD3858C52 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ibm.com Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33LCfKtK025904; Fri, 21 Apr 2023 13:00:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=pp1; bh=6yX1ggHCHWAOR2OO/8kPYnoydByC4OCWHfcHCBQZd/4=; b=dZTAzIKjzD2CJoauhD8FVIF7fs6c6kjiE9Kz6PP3GEwlKnlYuApV7UXIOKsUHZGL5hGY EtKkx7vV9SduBKshOfr6Yy1fhlQRqMt/TX2S3oF8dMuJXytsd5AZLGTE4ytIIhm4cJPZ HBrJQm88M3ZPrZeG5EuOK3NFTeLqEOShxYNq2EqHaYpjNT4vW1TjiCb2OMaasr9+KZNy Fy6nn8MJXDB+Y1CIukaRdIic5oolvWjQX7EZ/gy2tanrNajkiVsZdt5QjWwAEKazl3Pu guXLl+Akn6D8x6IXdBpktsMBVEAhXHHa6EQKotKEVT61n6reacyzkV88JUaRT7Var/Ik Uw== Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2175.outbound.protection.outlook.com [104.47.55.175]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3q3tkvs96x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Apr 2023 13:00:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Clfoh+1ebLOUHLfWX8LOlwh5HhiPdLc9JGFZ2IcQIkNp4XdNrzhlR20zFc5c3ZjFFgIP9Qn9qw+BF/qc4jS7FvH8lZKRIRPb1N8uw7x89l8q8D8pK6z+4mc7X7dds+meDfsn81IjYb7uWHB3GZkN/3yY3uW6n3RDRmV0Jhj+FDVF1ICMORgsmACw5FrGgwkghr/DwFerKeRI0kZDw5Itqk8fr5RjANzxAiEtBbdJwKrFIJX90gYVxElDUiHAEQPc4zfvPVM2Ox4sjY1RYmY8fQcTPw+xd/agg2Tz1/OP4s6qURIUlhEfaRURBKMGMbX8MO4m0ak3jAOFimm6pikB/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=R1dEUnc/I1Lz4LBk2TOxjZAFTrmFnVkWhZIIRNH0Rf0=; b=dUFv7fE4gLWQgxInWHzg2VcDY8gfbnWD3LtLGf5Jkccq30H54UIlRrdDhv/k/F4CwdFAg6F9GCBnekt912ecZQImWH+0ySAk9kqihORTtodtRh8oPlWHcDYKzbUA6HyiaZgI4gZ9nfxFzgZVLU7TtxjN+o9SnIWI4VQ+zWaQ1UnAT/Og0fdIAksMurUXx9WVfqckoOknc/Sk/CyJKgIAs3zfM6ys9CtX6r8u+pnt+lA3W0Dd4Z+HJD+xt06L3EKakkw8Qs+UPNhE27DpBh5lwe/zzaMFzql1dnUuAWgdHqkFo4FJT6ATLScu98e6u+iiAHd8sb2H4OiKowMs4EvBwQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ibm.com; dmarc=pass action=none header.from=ibm.com; dkim=pass header.d=ibm.com; arc=none Received: from CH2PR15MB3544.namprd15.prod.outlook.com (2603:10b6:610:5::26) by SA0PR15MB4062.namprd15.prod.outlook.com (2603:10b6:806:82::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.20; Fri, 21 Apr 2023 13:00:47 +0000 Received: from CH2PR15MB3544.namprd15.prod.outlook.com ([fe80::fc4b:b8cb:1472:d50a]) by CH2PR15MB3544.namprd15.prod.outlook.com ([fe80::fc4b:b8cb:1472:d50a%6]) with mapi id 15.20.6319.022; Fri, 21 Apr 2023 13:00:46 +0000 From: Aditya Kamath1 To: Ulrich Weigand , "gdb-patches@sourceware.org" , "tom@tromey.com" CC: Sangamesh Mallayya , "simon.marchi@efficios.com" Subject: Re: [PATCH] Fix call functions command bug in 64-bit programs for AIX and PC read in psymtab-symtab warning Thread-Topic: [PATCH] Fix call functions command bug in 64-bit programs for AIX and PC read in psymtab-symtab warning Thread-Index: AQHZcd5L2dXxgi+CmEyMBkzt8Jq4Lq81r7/P Date: Fri, 21 Apr 2023 13:00:46 +0000 Message-ID: References: <049a54779f7280ddef6c2da12d0714023514dc9b.camel@de.ibm.com> <881bbbcc3646f5df9c2f334133907d3ca37149a6.camel@de.ibm.com> <48b9cc7b5cb4981f03fd459c4365242a11546c1e.camel@de.ibm.com> <87r0xsb4np.fsf@tromey.com> <87sfd24j4w.fsf@tromey.com> <6dba16478c04d83780e4996236ba4fad4d7a5395.camel@de.ibm.com> In-Reply-To: <6dba16478c04d83780e4996236ba4fad4d7a5395.camel@de.ibm.com> Accept-Language: en-IN, en-US Content-Language: en-IN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CH2PR15MB3544:EE_|SA0PR15MB4062:EE_ x-ms-office365-filtering-correlation-id: d1bfb5cd-36bb-48d6-2190-08db42686c75 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PQGKJ8ACongB/ClAqaz12kWCHX2CQ/lZnpd/IAsoZ9HUgjdy7Dwd4opiGLftCXbanMXoEmE1yOpnteiIRbV6UExok8nY1qRUCVMKhaqyGPzQTox4R/VH9eBYZcEhfOL+jZhnwZOgEomJOi6xBY6ZFSWXDp9n4WTEqJhkKPb7E3ZAGCLopyJ2JDdYeTQ8pGJHFaI6T0/dBhYfvBw1TayuBeV6Okm9rkg2uZsvfY/sUwRqftX1+uTX1x/PpSu5Fstd1eb0+x4T6vFMTxniNqbp2MKwqMshW8McJvUXcUBjp7ppjcGffKG/YS+rEugrdWj1eSsI+O8sYyQ36Wbxks+NqLf4ozBZ4FYZ+0VoAEEFPWLeZv2XR5gvvovVfmqJvpVGG0oLpQLoOpnxCmyP/TQNDIgY8n7o9RB7fEjaAE2xazUp+66121ZrDjhFKk5T+Y0A9lb01GF0b0ISxxtVJwZFuwHJf//tjvkbLh9L6vhjkWbwM6SqhPiZW8KY6LWAfWrtunDA3gl1QLdFCWSSJIu0G8hHQ27Jj4upWqAGcf4GH8qcgfQILONCr2NeSimLfZItE7F9J5ABayT3IjEco3n2FmD6wzW6+U5WKuVz7amNJuwl+Z/g+lwHJ4Gmw1n7S1H5 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH2PR15MB3544.namprd15.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(366004)(39860400002)(136003)(346002)(376002)(396003)(451199021)(55016003)(66446008)(41300700001)(316002)(91956017)(66946007)(4326008)(66476007)(64756008)(76116006)(478600001)(66556008)(110136005)(8936002)(8676002)(54906003)(52536014)(38100700002)(122000001)(9686003)(186003)(53546011)(83380400001)(7696005)(71200400001)(5660300002)(6506007)(86362001)(30864003)(33656002)(38070700005)(2906002)(559001)(579004);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?u8hLCpD+CsfsXjXvgW2OB8f6RIs24gU9CDsCF9tMNhnKnfxTU0rCUtjI?= =?Windows-1252?Q?WsTSNBfAO6klbD6+II9adDWBhbHs2QUc4hsNXDBw0Bc5AftXGvonH19Y?= =?Windows-1252?Q?w3Ee9oDzezaxkUvoS+xEPfhOuTSmauW8bYyDfv7m1yW/Y8g21am1DF0E?= =?Windows-1252?Q?lU3xL4y1F53H9BlsqpfFUtAIbmSRwIqs76xQIzS3Zu+dIHSCcWz2edrs?= =?Windows-1252?Q?imInzd0U+VyBLlEfJ77tHRkszKU+tdxoJGDbEHPaRFh+ZyK6NtwqBcXC?= =?Windows-1252?Q?95IqlNfCrhjMecAdGe3LhnxxturcfSe7sTGhNbEDMEbQFdFoVwdHJfyX?= =?Windows-1252?Q?+Bge339187yuoB2F4cJL0yk653vNu2MWrnbhGjkjPhcofoG7SouUXpX7?= =?Windows-1252?Q?LhfGoRApNKuE9YjI3hB4yXbZwmCGldxZy2oN/2KQMHvROteuYrfgPPG3?= =?Windows-1252?Q?yvpLuqtiK9u5Dtcj+zo1O7qqCnOt5CD1QxJ2g8ZIzvEt/IWX6XNQ5zTx?= =?Windows-1252?Q?ha3rDNB0sVdIMLwdn4rbK2WUEcgpvmjOgwQvmoeKHpaKnaMaFXNC2PP7?= =?Windows-1252?Q?yzF/RKqTS1oswrndydEp7rOB20eFu4Z404dhKGdDVq7nCoArz7fb2eJy?= =?Windows-1252?Q?Q5bZmH1kA2SIN1L47T3HRrm1IiYCCjY96f6hzwedetN1K9GmnscMreY9?= =?Windows-1252?Q?ba7Wu3xaSqCIrYwruyaAUBfcnaKh2+sR7P6IyekQk2DJvYP3H6FGhBx+?= =?Windows-1252?Q?gBrOEMZghwc7L3KG3L0M8ZiZJ9rx65jXBMF+aOwY0HqIHEOU4boOVPds?= =?Windows-1252?Q?HFSvsmY/4v4Lu7LCocNf9Nu4DA8WPjpY9mwJ05yZze+Ws4r9281eDMhY?= =?Windows-1252?Q?SY/zPbrHWsNDWqoADj/nxKPdJmPzIxgjabtXbGvyzHTNsDCJj5OR9kB+?= =?Windows-1252?Q?SDwxxQd68gdTR61lkYT5IB096aVunIQ8AarIRtxXt2KMlJofp8u2hnyz?= =?Windows-1252?Q?X7LiLTNMgaUI3Y0I9PV76p8BkaGAuzGb/CyxN+qEWPXSZVu5johKJl11?= =?Windows-1252?Q?GFJjGJ9IsmrDZ8ixefU3iAMDBfTCDPXEJrStPmG5YSgYNtwnWqxGGyUg?= =?Windows-1252?Q?bday+6Eo3/qxGv39UyHYaPDms+YZWCU9R+akpkwbrcaHJYdg/9qOgazU?= =?Windows-1252?Q?GCp9iTj9whEf5esN4Ib0Xp6W46Zape+7Nnx50CbYSTu8DWwkYxHyagkR?= =?Windows-1252?Q?fdMCGhco4Knk5bZgTh6tva5PS7iFgCQ5quDK6JkeXxFM0PywPDoeVzS0?= =?Windows-1252?Q?NVz1Jhwzj2R5JCAxWYkJgik9lH1rsq2Oq7xIS1r74S3/X4WpuynToIVu?= =?Windows-1252?Q?499NEiFUSOKdw+lO6fzWiZjZyTPC+XNlmGX9ngxez0MIJfZcy5Rk/6J8?= =?Windows-1252?Q?CrWDHrRDiFWUrJYKo9CgUSyenAsidfyojC7t4WCUm6GwopZImaSreCgr?= =?Windows-1252?Q?ZdAqSRQ5uTDDFRkc9C1JrlL7gPqARDUyeUug6tSHXUCzDKae3Rt/nirL?= =?Windows-1252?Q?sWIFmBXjS81Fl4xp3Vx91siHiK9xzp4xJGItzITma6PyF22SJMwoUzzx?= =?Windows-1252?Q?VDdqtZlF+5jiED+TOPWTTpL1ZKqBSPYBM3fz0OaGsgC22wdJfLaZkmgH?= =?Windows-1252?Q?Nws4CG1PVn1nSCgB7w3jJwLYSdY3QEQxD2XCqre+TjtX1B38CSDO3O+h?= =?Windows-1252?Q?Rj9Bq3C+6Na4lU1FGaRLEmVi7IQKC9aBj4WD12E+5yqkLeH7ANrN0Mxq?= =?Windows-1252?Q?DrqqhA=3D=3D?= Content-Type: multipart/alternative; boundary="_000_CH2PR15MB35442EE01CC59A685984437FD6609CH2PR15MB3544namp_" X-OriginatorOrg: ibm.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH2PR15MB3544.namprd15.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d1bfb5cd-36bb-48d6-2190-08db42686c75 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Apr 2023 13:00:46.6355 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fcf67057-50c9-4ad4-98f3-ffca64add9e9 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 9Oj9f3lflCATLz5iy/mibV83h14LUW+utV7qwXmk1t6OCf4ycYqCA7Pei97ByLpH9+qx0TZMqioEPmfFQV0rDQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR15MB4062 X-Proofpoint-GUID: mYJCaT2ul-4OKcmePsmFylob9fu5ptQa X-Proofpoint-ORIG-GUID: mYJCaT2ul-4OKcmePsmFylob9fu5ptQa X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-21_06,2023-04-21_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 adultscore=0 phishscore=0 lowpriorityscore=0 clxscore=1011 priorityscore=1501 suspectscore=0 mlxlogscore=999 malwarescore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304210109 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --_000_CH2PR15MB35442EE01CC59A685984437FD6609CH2PR15MB3544namp_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hi Ulrich, Tom and community, So here is my further understanding to this. >Instead of simply disabling generation of those psymtab entries, >I think we should first understand why those values end up wrong. >Is this already a problem in the underlying XCOFF file debug info, >or is this just read in incorrectly by GDB/BFD at some point? >Can you debug a bit more exactly where the wrong values come from? >Is there some AIX tool you can use to look at the XCOFF debug info >directly to compare with what GDB is reading? Consider the example 1: #include 2: int global_variable =3D 2; 3: int main(){ 4: int local_variable =3D 1; 5: printf ("Simple print statement \n"); 6: printf ("Hello Bengaluru \n"); 7: return 0; 8:} For this code there are 345 symbols I see using the dump -tov ~/gdb_tests/s= imple_test.. I have pasted them below this email=85 All of them are getting into the tables via xcoff_initial_scan code. Their = entries are also same as the object dump. So here is the thing, there are 4 values for which the psymtab entries are = created. Their addresses are 0, 1a0, 0 and 8. In the object dump outputs I see they are like this.. [235] m 0x00000000 debug 0 gsym __new_exi= tfn_called:G13=3D14=3D@s64;r14;0;01777777777777777777777; [236] m 0x00000008 debug 0 gsym __exit_fu= ncs:G4 [188] m 0x000001a0 debug 0 fun __interna= l_atexit:F8=3Dr8;-2147483648;2147483647; [177] m 0x00000000 debug 0 fun __new_exi= tfn:F1=3D*2=3Dxsexit_function: It looks like these are global symbols and functions. Hence they satisfy th= e case G in the xcoffread.c file and psymtab entries are created. Kindly have a look at the disassemble output of this code, (gdb) disassemble Dump of assembler code for function main: 0x10000518 <+0>: mflr r0 0x1000051c <+4>: stw r0,8(r1) 0x10000520 <+8>: stw r31,-4(r1) 0x10000524 <+12>: stwu r1,-96(r1) 0x10000528 <+16>: mr r31,r1 0x1000052c <+20>: li r9,1 0x10000530 <+24>: stw r9,56(r31) 0x10000534 <+28>: lwz r3,64(r2) 0x10000538 <+32>: warning: (Internal error: pc 0x100005a8 in read i= n psymtab, but not in symtab.) bl 0x100005a8 0x1000053c <+36>: lwz r2,20(r1) =3D> 0x10000540 <+40>: lwz r3,72(r2) 0x10000544 <+44>: warning: (Internal error: pc 0x100005a8 in read i= n psymtab, but not in symtab.) bl 0x100005a8 0x10000548 <+48>: lwz r2,20(r1) 0x1000054c <+52>: li r9,0 0x10000550 <+56>: mr r3,r9 0x10000554 <+60>: addi r1,r31,96 0x10000558 <+64>: lwz r0,8(r1) 0x1000055c <+68>: mtlr r0 0x10000560 <+72>: lwz r31,-4(r1) 0x10000564 <+76>: blr 0x10000568 <+80>: .long 0x0 0x1000056c <+84>: .long 0x2061 0x10000570 <+88>: lwz r0,1(r1) 0x10000574 <+92>: .long 0x50 0x10000578 <+96>: .long 0x46d61 0x1000057c <+100>: xori r14,r11,7936 End of assembler dump. (gdb) When we are at line number 4 of the C code and press a next, GDB is searchi= ng for the next pc which is 0x100005a8, nothing but in search of printf ().= This is done in the function find_pc_sect_line () in symtab.c. Here pc parameter in the function is 0x100005a8. GDB here figures out this = is a shared library trampoline. In gdb terms mst_solib_trampoline. So it goes in search of find_pc_line (mfunsym.value_address (), 0); Where m= funsym.value_address is d03b0160 which is range of the libc shared library = and 0 indicates to not raise a warning. info sharedlibrary output (gdb) info sharedlibrary =46rom To Syms Read Shared Object Library 0xd05bb240 0xd05bb9a1 Yes (*) /usr/lib/libcrypt.a(shr.o) 0xd0100e00 0xd0575123 Yes (*) /usr/lib/libc.a(shr.o) (*): Shared library is missing debugging information. (gdb) Now, GDB searches for pc d03b0160 again in function find_pc_sect_line () in= symtab.c=85 This address is not there in object dump output, not there in symbol table = and not there in psymbol table as well. Hence now it goes into =93 cust =3D find_pc_sect_compunit_symtab (pc, secti= on); =93 with this pc. This is where the psymtab journey and the mess start= s. This function is again in the symtab.c file. It searches throughout the = symbol table and does not find the address d03b0160. Now it gets into this code /* Not found in symtabs, search the "quick" symtabs (e.g. psymtabs). */ for (objfile *objf : current_program_space->objfiles ()) { struct compunit_symtab *result =3D objf->find_pc_sect_compunit_symtab (msymbol, pc, section, 1); if (result !=3D NULL) return result; } We can see objf->find_pc_sect_compunit_symtab (msymbol, pc, section, 1);, t= he warnings are turned on now. Through the find_pc_sect_compunit_symtab und= er the psymtab namespace it goes in search of the best_pc. The route it takes is psymbol_functions::find_pc_sect_compunit_symtab () ->= psymbol_functions::find_pc_sect_psymtab () -> find_pc_sect_psymtab_closer = () -> p =3D find_pc_sect_psymbol (objfile, tpst, pc, section); So all this is done to find the best nearest pc possible.. Along these lines in find_pc_sect_symbol () for (partial_symbol *p : psymtab->global_psymbols) { if (p->domain =3D=3D VAR_DOMAIN && p->aclass =3D=3D LOC_BLOCK && pc >=3D p->address (objfile) && (p->address (objfile) > best_pc || (psymtab->text_low (objfile) =3D=3D 0 && best_pc =3D=3D 0 && p->address (objfile) =3D=3D 0))) { if (section !=3D NULL) /* Match on a specific section. */ { if (!matching_obj_sections (p->obj_section (objfile), section)) continue; } best_pc =3D p->address (objfile); best =3D p; } } Over here we know that address 1a0 will be closest to mfunsym.value_address= or printf () address d03b0160. Hence this psymtab entry is returned. Altho= ugh this is far from being close but still turns out to be the best. This m= akes me confused why we are looking for the best nearest PC here. Shouldn= =92t this have some limit to the difference in pc=92s of what we are lookin= g for?? This is where I feel we need to change our logic. After this in the psymbol_functions::find_pc_sect_compunit_symtab () since = it returned that 1a0=92s psymtab entry, the below code does the rest. And A= IX GDB is flooded with the warnings. struct partial_symtab *ps =3D find_pc_sect_psymtab (objfile, pc, section, msymbol); if (ps !=3D NULL) { if (warn_if_readin && ps->readin_p (objfile)) /* Might want to error() here (in case symtab is corrupt and will cause a core dump), but maybe we can successfully continue, so let's not. */ warning (_("\ (Internal error: pc %s in read in psymtab, but not in symtab.)\n"), paddress (objfile->arch (), pc)); psymtab_to_symtab (objfile, ps); return ps->get_compunit_symtab (objfile); } So concluding my explain nation, there are two things. One is this psymtab entries, we need to limit the difference of pc that can= be used as best_pc.. This can be one entry point to take control and add a= symbol table for AIX for this printf (). Such that if the limit is too muc= h this might indicate the need for an external shared library symbol and ad= d the symbol entry. I see in dwarf2/read.c there is some code doing the sha= red library entries if I understood it correctly. But I do not know if this= can be the correct way. But I got my previous patch wrong. That I can say = for sure. Removing the psymtab entries may not be correct and these entries= are what is there in the object dump. Second thing, we can think is some kind of lazy loading where the moment we= detect a shared library trampoline to be executed or will be the PC we can= create the symbol table entry for the shared library functions, so that be= fore GDB jumps into of find_pc_line (mfunsym.value_address (), 0), we can a= dd the symbol table entry. I have not succeeded so far in my attempt to fix this though I learnt diffe= rent things about symbols and symbol table. I have given the explanation to= what I understood and where can be the points we can make changes. Kindly guide me, so that we can fix this issue for GDB and AIX. I want to k= now what can we do next from here, given we know what is going on and the r= oot cause and place of problem for the same. Awaiting a reply. Have a nice day ahead. Thanks and regards, Aditya. ------------------------------------------------------ Object dump output----- dump -tov ~/gdb_tests/simple_test /home/aditya/gdb_tests/simple_test: ***Object Module Header*** # Sections Symbol Ptr # Symbols Opt Hdr Len Flags 10 0x00002078 345 72 0x1002 Flags=3D( EXEC DYNLOAD DEP_SYSTEM ) Timestamp =3D "Apr 21 01:07:51 2023" Magic =3D 0x1df (32-bit XCOFF) ***Optional Header*** Tsize Dsize Bsize Tstart Dstart 0x00000b6d 0x000001d7 0x00000214 0x10000290 0x20000dfd SNloader SNentry SNtext SNtoc SNdata 0x0004 0x0002 0x0001 0x0002 0x0002 TXTalign DATAalign TOC vstamp entry 0x0005 0x0004 0x20000f5c 0x0001 0x20000f24 maxSTACK maxDATA SNbss magic modtype 0x00000000 0x00000000 0x0003 0x010b 1L ***Symbol Table Information*** [Index] m Value Scn Aux Sclass Type Name [Index] a0 Fname [Index] a1 Tagndx Lnno Size Lnoptr Endndx [Index] a2 Tagndx Fsiz Lnoptr Endndx [Index] a3 Tagndx Lnno Size Dimensions [Index] a4 CSlen PARMhsh SNhash SMtype SMclass Stab SNstab [Index] a5 SECTlen #RELent #LINnums [0] m 0x00000000 undef 1 extern errno [1] a4 0x00000000 0 0 ER RW 0 0 [2] m 0x00000000 undef 1 extern calloc [3] a4 0x00000000 0 0 ER DS 0 0 [4] m 0x00000000 undef 1 extern exit [5] a4 0x00000000 0 0 ER DS 0 0 [6] m 0x00000000 undef 1 extern __assert [7] a4 0x00000000 0 0 ER DS 0 0 [8] m 0x00000000 undef 1 extern puts [9] a4 0x00000000 0 0 ER DS 0 0 [10] m 0x00000000 undef 1 extern __strtoll= max [11] a4 0x00000000 0 0 ER DS 0 0 [12] m 0x00000000 undef 1 extern __mod_init [13] a4 0x00000000 0 0 ER DS 0 0 [14] m 0x00000000 undef 1 extern __crt0v [15] a4 0x00000000 0 0 ER RW 0 0 [16] m 0x00000000 undef 1 extern __malloc_= user_defined_name [17] a4 0x00000000 0 0 ER RW 0 0 [18] m 0x20000f5c .data 1 unamex TOC [19] a4 0x00000000 0 0 SD TC0 0 0 [20] m 0x20000f84 .data 1 unamex __crt0v [21] a4 0x00000004 0 0 SD TC 0 0 [22] m 0x20000f88 .data 1 unamex __mod_init [23] a4 0x00000004 0 0 SD TC 0 0 [24] m 0x20000f8c .data 1 unamex crt0_data [25] a4 0x00000004 0 0 SD TC 0 0 [26] m 0x20000f90 .data 1 unamex __malloc_= user_defined_name [27] a4 0x00000004 0 0 SD TC 0 0 [28] m 0x20000f94 .data 1 unamex errno [29] a4 0x00000004 0 0 SD TC 0 0 [30] m 0x20000f98 .data 1 unamex __strtoll= max [31] a4 0x00000004 0 0 SD TC 0 0 [32] m 0x20000f9c .data 1 unamex LC..0 [33] a4 0x00000004 0 0 SD TC 0 0 [34] m 0x20000fa0 .data 1 unamex puts [35] a4 0x00000004 0 0 SD TC 0 0 [36] m 0x20000fa4 .data 1 unamex LC..2 [37] a4 0x00000004 0 0 SD TC 0 0 [38] m 0x20000fa8 .data 1 unamex exit [39] a4 0x00000004 0 0 SD TC 0 0 [40] m 0x20000fac .data 1 unamex __dso_han= dle [41] a4 0x00000004 0 0 SD TC 0 0 [42] m 0x20000fb0 .data 1 unamex __exit_fu= ncs [43] a4 0x00000004 0 0 SD TC 0 0 [44] m 0x20000fb4 .data 1 unamex LANCHOR..0 [45] a4 0x00000004 0 0 SD TC 0 0 [46] m 0x20000fb8 .data 1 unamex calloc [47] a4 0x00000004 0 0 SD TC 0 0 [48] m 0x20000fbc .data 1 unamex LANCHOR..1 [49] a4 0x00000004 0 0 SD TC 0 0 [50] m 0x20000fc0 .data 1 unamex __assert [51] a4 0x00000004 0 0 SD TC 0 0 [52] m 0x20000fc4 .data 1 unamex __new_exi= tfn_called [53] a4 0x00000004 0 0 SD TC 0 0 [54] m 0x20000fc8 .data 1 unamex count [55] a4 0x00000004 0 0 SD TC 0 0 [56] m 0x20000fcc .data 1 unamex dtors.0 [57] a4 0x00000004 0 0 SD TC 0 0 [58] m 0x20000fd0 .data 1 unamex dtors.0.P4 [59] a4 0x00000004 0 0 SD TC 0 0 [60] m 0x0000003d debug 0 FILE FRONT:COM [61] m 0x00000052 debug 0 FILE ASM:COM crt0main.s [62] m 0x10000290 .text 1 unamex .__start [63] a4 0x000000a5 0 0 SD PR 0 0 [64] m 0x10000290 .text 1 extern .__start [65] a4 0x0000003e 0 0 LD PR 0 0 [66] m 0x20000f24 .data 1 extern __start [67] a4 0x00000008 0 0 SD DS 0 0 [68] m 0x20000e00 .data 1 unamex crt0_data [69] a4 0x0000002c 0 0 SD RW 0 0 [70] m 0x20000f60 .data 1 extern p_xargc [71] a4 0x00000004 0 0 CM TD 0 0 [72] m 0x20000f78 .data 1 extern p_xargv [73] a4 0x00000004 0 0 CM TD 0 0 [74] m 0x20000f7c .data 1 extern p_xrcfg [75] a4 0x00000004 0 0 CM TD 0 0 [76] m 0x20000f80 .data 1 extern p_xrc [77] a4 0x00000004 0 0 CM TD 0 0 [78] m 0x20000f5c .data 1 extern _malloc_u= ser_defined_name [79] a4 0x00000004 0 0 CM TD 0 0 [80] m 0x200011e4 .bss 1 extern __C_runti= me_pstartup [81] a4 0x00000004 0 0 CM RW 0 0 [82] m 0x0000006a debug 3 FILE C:COM .file [83] a0 ../../../= ../../../../src/bos/usr/ccs/lib/libc/__threads_init.c [84] a0 Tue May = 7 10:49:34 2019 [85] a0 IBM XL C = for AIX, Version 13.1.0.2 [86] m 0x10000340 .text 1 unamex **No Symb= ol** [87] a4 0x00000160 0 0 SD PR 0 0 [88] m 0x10000340 .text 1 extern .__thread= s_init [89] a4 0x00000056 0 0 LD PR 0 0 [90] m 0x10000380 .text 1 unamex .__thread= s_init@AF2_1 [91] a4 0x00000056 0 0 LD PR 0 0 [92] m 0x20000e30 .data 1 unamex _$STATIC [93] a4 0x00000059 0 0 SD RW 0 0 [94] m 0x20000f2c .data 1 extern __threads= _init [95] a4 0x0000000c 0 0 SD DS 0 0 [96] m 0x20000f64 .data 1 extern __pth_ini= t_routine [97] a4 0x00000004 0 0 CM TD 0 0 [98] m 0x20000f68 .data 1 extern _bsd_init= _routine [99] a4 0x00000004 0 0 CM TD 0 0 [100] m 0x20000f6c .data 1 extern _xti_tli_= init_routine [101] a4 0x00000004 0 0 CM TD 0 0 [102] m 0x20000f70 .data 1 extern _nsl_init= _routine [103] a4 0x00000004 0 0 CM TD 0 0 [104] m 0x20000f74 .data 1 extern __dce_com= pat_init_routine [105] a4 0x00000004 0 0 CM TD 0 0 [106] m 0x0000007d debug 0 FILE C:COM /tmp//ccx= FwDye.cdtor.c [107] m 0x10000ad4 .text 1 unamex .text [108] a4 0x00000124 0 0 SD PR 0 0 [109] m 0x10000ad4 .text 1 extern ._GLOBAL_= _FI_simple_test [110] a4 0x0000006b 0 0 LD PR 0 0 [111] m 0x10000b30 .text 1 extern ._GLOBAL_= _FD_simple_test [112] a4 0x0000006b 0 0 LD PR 0 0 [113] m 0x20000f44 .data 1 unamex _GLOBAL__= FI_simple_test [114] a4 0x0000000c 0 0 SD DS 0 0 [115] m 0x20000f44 .data 1 extern _GLOBAL__= FI_simple_test [116] a4 0x00000071 0 0 LD DS 0 0 [117] m 0x20000f50 .data 1 unamex _GLOBAL__= FD_simple_test [118] a4 0x0000000c 0 0 SD DS 0 0 [119] m 0x20000f50 .data 1 extern _GLOBAL__= FD_simple_test [120] a4 0x00000075 0 0 LD DS 0 0 [121] m 0x20000eb0 .data 1 unamex _ccxFwDye= cdtor.rw_ [122] a4 0x00000004 0 0 SD RW 0 0 [123] m 0x200011e0 .bss 1 unamex _ccxFwDye= cdtor.bss_ [124] a4 0x00000004 0 0 CM BS 0 0 [125] m 0x0000008e debug 0 FILE C:COM ../../../= gcc-10.3.0/libgcc/config/rs6000/crtcxa.c [126] m 0x1000062c .text 1 unamex .text [127] a4 0x00000000 0 0 SD PR 0 0 [128] m 0x100005f8 .text 1 unamex ..text.ex= it [129] a4 0x00000034 0 0 SD PR 0 0 [130] m 0x100005f8 .text 1 extern .__init_a= ix_libgcc_cxa_atexit [131] a4 0x00000080 0 0 LD PR 0 0 [132] m 0x10000628 .text 1 extern ._GLOBAL_= _D_65535_0___dso_handle [133] a4 0x00000080 0 0 LD PR 0 0 [134] m 0x20000e90 .data 1 unamex .data [135] a4 0x00000008 0 0 SD RW 0 0 [136] m 0x20000e90 .data 1 extern __dso_han= dle [137] a4 0x00000086 0 0 LD RW 0 0 [138] m 0x20000f38 .data 1 unamex _GLOBAL__= D_65535_0___dso_handle [139] a4 0x0000000c 0 0 SD DS 0 0 [140] m 0x20000f38 .data 1 extern _GLOBAL__= D_65535_0___dso_handle [141] a4 0x0000008a 0 0 LD DS 0 0 [142] m 0x000000a3 debug 0 FILE C:COM /home/adi= tya/gdb_tests/simple_test.c [143] m 0x00000000 .dwline 1 dwarf .dwline [144] a5 0x00000118 0x0000 [145] m 0x00000000 .dwinfo 1 dwarf .dwinfo [146] a5 0x00000223 0x0000 [147] m 0x00000000 .dwabrev 1 dwarf .dwabrev [148] a5 0x000000b2 0x0000 [149] m 0x00000000 .dwarnge 1 dwarf .dwarnge [150] a5 0x00000020 0x0000 [151] m 0x00000000 .dwloc 1 dwarf .dwloc [152] a5 0x00000074 0x0000 [153] m 0x100004a0 .text 1 unamex .text [154] a4 0x000000e0 0 0 SD PR 0 0 [155] m 0x100004a0 .text 2 unamex .strtoimax [156] a2 0 224 7658 135 [157] a4 0x00000099 0 0 LD PR 0 0 [158] m 0x10000518 .text 2 extern .main [159] a2 0 224 7664 135 [160] a4 0x00000099 0 0 LD PR 0 0 [161] m 0x10000c00 .text 1 unamex _simplete= st.rop_ [162] a4 0x00000029 0 0 SD RO 0 0 [163] m 0x000000fb debug 0 FILE C:PPC ../../../= gcc-10.3.0/libgcc/config/rs6000/cxa_atexit.c [164] m 0x00001f76 debug 0 bincl ../../../= gcc-10.3.0/libgcc/config/rs6000/cxa_atexit.c [165] m 0x00001f76 debug 0 eincl ../../../= gcc-10.3.0/libgcc/config/rs6000/cxa_atexit.c [166] m 0x00001f82 debug 0 bincl ../../../= gcc-10.3.0/libgcc/config/rs6000/cxa_atexit.c [167] m 0x00001f82 debug 0 eincl ../../../= gcc-10.3.0/libgcc/config/rs6000/cxa_atexit.c [168] m 0x00001f8e debug 0 bincl ../../../= gcc-10.3.0/libgcc/config/rs6000/cxa_atexit.c [169] m 0x00001fbe debug 0 eincl ../../../= gcc-10.3.0/libgcc/config/rs6000/cxa_atexit.c [170] m 0x00001fca debug 0 bincl ../../../= gcc-10.3.0/libgcc/config/rs6000/cxa_atexit.c [171] m 0x00001fca debug 0 eincl ../../../= gcc-10.3.0/libgcc/config/rs6000/cxa_atexit.c [172] m 0x100007a8 .text 1 unamex .text [173] a4 0x000002dc 0 0 SD PR 0 0 [174] m 0x100007a8 .text 2 extern .__new_ex= itfn [175] a2 0 416 7670 185 [176] a4 0x000000ac 0 0 LD PR 0 0 [177] m 0x00000000 debug 0 fun __new_exi= tfn:F1=3D*2=3Dxsexit_function: [178] m 0x100007a8 .text 1 fcn .bf [179] a1 0 75 0 0 0 [180] m 0x0000001f debug 0 rpsym listp:R3= =3D*4=3D*5=3Dxsexit_function_list: [181] m 0x00000003 debug 0 rsym r:r1 [182] m 0x00000009 debug 0 rsym i:r6=3D7= =3Dr7;0;037777777777; [183] m 0x10000924 .text 1 fcn .ef [184] a1 0 131 0 0 0 [185] m 0x10000948 .text 2 extern .__intern= al_atexit [186] a2 0 156 7952 197 [187] a4 0x000000ac 0 0 LD PR 0 0 [188] m 0x000001a0 debug 0 fun __interna= l_atexit:F8=3Dr8;-2147483648;2147483647; [189] m 0x10000948 .text 1 fcn .bf [190] a1 0 40 0 0 0 [191] m 0x0000001d debug 0 rpsym func:R9= =3D*10=3Df11=3D11 [192] m 0x0000001e debug 0 rpsym arg:R12= =3D*11 [193] m 0x0000001f debug 0 rpsym d:R12 [194] m 0x00000006 debug 0 rpsym listp:R3 [195] m 0x100009bc .text 1 fcn .ef [196] a1 0 55 0 0 0 [197] m 0x100009e8 .text 2 extern .__cxa_at= exit [198] a2 0 156 8042 235 [199] a4 0x000000ac 0 0 LD PR 0 0 [200] m 0x100009e8 .text 1 fcn .bf [201] a1 0 63 0 0 0 [202] m 0x0000001d debug 0 rpsym func:R9 [203] m 0x0000001e debug 0 rpsym arg:R12 [204] m 0x0000001f debug 0 rpsym d:R12 [205] m 0x100009f0 .text 1 block .bb [206] a1 0 1 0 0 53 [207] m 0x100009f4 .text 1 block .eb [208] a1 0 63 0 0 0 [209] m 0x10000a08 .text 1 block .bb [210] a1 0 1 0 0 61 [211] m 0x10000a08 .text 1 block .bb [212] a1 0 1 0 0 59 [213] m 0x10000a0c .text 1 block .eb [214] a1 0 63 0 0 0 [215] m 0x10000a0c .text 1 block .eb [216] a1 0 63 0 0 0 [217] m 0x10000a14 .text 1 block .bb [218] a1 0 1 0 0 69 [219] m 0x10000a14 .text 1 block .bb [220] a1 0 1 0 0 67 [221] m 0x10000a3c .text 1 block .eb [222] a1 0 63 0 0 0 [223] m 0x10000a3c .text 1 block .eb [224] a1 0 63 0 0 0 [225] m 0x10000a58 .text 1 block .bb [226] a1 0 3 0 0 77 [227] m 0x10000a58 .text 1 block .bb [228] a1 0 3 0 0 75 [229] m 0x10000a5c .text 1 block .eb [230] a1 0 65 0 0 0 [231] m 0x10000a5c .text 1 block .eb [232] a1 0 65 0 0 0 [233] m 0x10000a60 .text 1 fcn .ef [234] a1 0 65 0 0 0 [235] m 0x00000000 debug 0 gsym __new_exi= tfn_called:G13=3D14=3D@s64;r14;0;01777777777777777777777; [236] m 0x00000008 debug 0 gsym __exit_fu= ncs:G4 [237] m 0x10000dc0 .text 1 unamex _cxaatexi= t.rop_ [238] a4 0x0000003d 0 0 SD RO 0 0 [239] m 0x10000cb0 .text 1 unamex _cxaatexi= t.ro_ [240] a4 0x00000104 0 0 SD RO 0 0 [241] m 0x10000cb0 .text 1 extern _GLOBAL__= F___internal_atexit [242] a4 0x000000ef 0 0 LD RO 0 0 [243] m 0x20000ea0 .data 1 unamex .data [244] a4 0x00000010 0 0 SD RW 0 0 [245] m 0x20000ea0 .data 1 extern __new_exi= tfn_called [246] a4 0x000000f3 0 0 LD RW 0 0 [247] m 0x20000ea8 .data 1 extern __exit_fu= ncs [248] a4 0x000000f3 0 0 LD RW 0 0 [249] m 0x20000fd8 .bss 1 unamex _cxaatexi= t.bss_3_ [250] a4 0x00000208 0 0 CM BS 0 0 [251] m 0x00000140 debug 0 FILE C:PPC ../../../= gcc-10.3.0/libgcc/config/rs6000/cxa_finalize.c [252] m 0x00001fe2 debug 0 bincl ../../../= gcc-10.3.0/libgcc/config/rs6000/cxa_finalize.c [253] m 0x00001fe2 debug 0 eincl ../../../= gcc-10.3.0/libgcc/config/rs6000/cxa_finalize.c [254] m 0x00002048 debug 0 bincl ../../../= gcc-10.3.0/libgcc/config/rs6000/cxa_finalize.c [255] m 0x00002048 debug 0 eincl ../../../= gcc-10.3.0/libgcc/config/rs6000/cxa_finalize.c [256] m 0x1000062c .text 1 unamex .text [257] a4 0x0000017c 0 0 SD PR 0 0 [258] m 0x1000062c .text 2 extern .__cxa_fi= nalize [259] a2 0 380 8150 316 [260] a4 0x00000100 0 0 LD PR 0 0 [261] m 0x1000062c .text 1 fcn .bf [262] a1 0 44 0 0 0 [263] m 0x0000001b debug 0 rpsym d:R1=3D*2= =3D2 [264] m 0x0000001a debug 0 rsym funcs:r3= =3D*4=3Dxsexit_function_list: [265] m 0x0000001f debug 0 rsym f:r5=3D*6= =3Dxsexit_function: [266] m 0x10000660 .text 1 block .bb [267] a1 0 1 0 0 34 [268] m 0x00000009 debug 0 rsym cxafn:r7= =3D*8=3Df2 [269] m 0x00000003 debug 0 rsym cxaarg:r1 [270] m 0x10000660 .text 1 block .bb [271] a1 0 1 0 0 32 [272] m 0x10000660 .text 1 block .bb [273] a1 0 1 0 0 30 [274] m 0x10000664 .text 1 block .eb [275] a1 0 44 0 0 0 [276] m 0x10000664 .text 1 block .eb [277] a1 0 44 0 0 0 [278] m 0x10000664 .text 1 block .eb [279] a1 0 44 0 0 0 [280] m 0x10000688 .text 1 block .bb [281] a1 0 5 0 0 45 [282] m 0x0000001f debug 0 rsym f:r5 [283] m 0x100006ac .text 1 block .bb [284] a1 0 9 0 0 43 [285] m 0x00000009 debug 0 rsym cxafn:r7 [286] m 0x00000003 debug 0 rsym cxaarg:r1 [287] m 0x100006bc .text 1 block .eb [288] a1 0 14 0 0 0 [289] m 0x100006c8 .text 1 block .eb [290] a1 0 14 0 0 0 [291] m 0x1000071c .text 1 block .bb [292] a1 0 42 0 0 68 [293] m 0x0000001f debug 0 rsym f:r5 [294] m 0x1000071c .text 1 block .bb [295] a1 0 42 0 0 66 [296] m 0x00000009 debug 0 rsym cxafn:r7 [297] m 0x00000003 debug 0 rsym cxaarg:r1 [298] m 0x10000724 .text 1 block .bb [299] a1 0 17 0 0 60 [300] m 0x10000724 .text 1 block .bb [301] a1 0 17 0 0 58 [302] m 0x1000073c .text 1 block .eb [303] a1 0 60 0 0 0 [304] m 0x1000073c .text 1 block .eb [305] a1 0 60 0 0 0 [306] m 0x10000740 .text 1 block .bb [307] a1 0 16 0 0 64 [308] m 0x10000784 .text 1 block .eb [309] a1 0 30 0 0 0 [310] m 0x10000784 .text 1 block .eb [311] a1 0 30 0 0 0 [312] m 0x10000784 .text 1 block .eb [313] a1 0 30 0 0 0 [314] m 0x10000784 .text 1 fcn .ef [315] a1 0 85 0 0 0 [316] m 0x10000c30 .text 1 unamex _cxafinal= ize.ro_ [317] a4 0x00000080 0 0 SD RO 0 0 [318] m 0x10000c30 .text 1 extern _GLOBAL__= F___cxa_finalize [319] a4 0x0000013c 0 0 LD RO 0 0 [320] m 0x00000145 debug 0 FILE ASM:COM glink.s [321] m 0x100005d0 .text 1 unamex .exit [322] a4 0x00000028 0 0 SD GL 0 0 [323] m 0x100005d0 .text 1 extern .exit [324] a4 0x00000141 0 0 LD GL 0 0 [325] m 0x0000014a debug 0 FILE ASM:COM glink.s [326] m 0x10000580 .text 1 unamex .__strtol= lmax [327] a4 0x00000028 0 0 SD GL 0 0 [328] m 0x10000580 .text 1 extern .__strtol= lmax [329] a4 0x00000146 0 0 LD GL 0 0 [330] m 0x0000014f debug 0 FILE ASM:COM glink.s [331] m 0x100005a8 .text 1 unamex .puts [332] a4 0x00000028 0 0 SD GL 0 0 [333] m 0x100005a8 .text 1 extern .puts [334] a4 0x0000014b 0 0 LD GL 0 0 [335] m 0x00000154 debug 0 FILE ASM:COM glink.s [336] m 0x10000a84 .text 1 unamex .calloc [337] a4 0x00000028 0 0 SD GL 0 0 [338] m 0x10000a84 .text 1 extern .calloc [339] a4 0x00000150 0 0 LD GL 0 0 [340] m 0xffffffff debug 0 FILE ASM:COM glink.s [341] m 0x10000aac .text 1 unamex .__assert [342] a4 0x00000028 0 0 SD GL 0 0 [343] m 0x10000aac .text 1 extern .__assert [344] a4 0x00000155 0 0 LD GL 0 0 From: Ulrich Weigand Date: Tuesday, 18 April 2023 at 3:42 PM To: gdb-patches@sourceware.org , Aditya Kamath1= , tom@tromey.com Cc: Sangamesh Mallayya , simon.marchi@efficios.= com Subject: Re: [PATCH] Fix call functions command bug in 64-bit programs for = AIX and PC read in psymtab-symtab warning Aditya Kamath1 wrote: >What I realised is the address that is being passed as GLOBALS >looks bogus in the xcoffread.c file. I did not find it in object >dump. The core address for which the psymtab entries made >are 0 ,1a0, 0 and 8 for the below code.. These are not correct >core addresses at all. I was surprised as to where it came from >at first place. >Seeing the comments around the same place in xcoffread.c file at >the hunk lines of this patch , it looks like someone already knew >these addresses are incorrect in the past. And even in my investigation >I figured out that these psymbols are incorrect. Hence when function >shared library addresses are looked up in psymtab GDB finds the >nearest best false pysmtab symbol and returns it. Which it should not do. Instead of simply disabling generation of those psymtab entries, I think we should first understand why those values end up wrong. Is this already a problem in the underlying XCOFF file debug info, or is this just read in incorrectly by GDB/BFD at some point? Can you debug a bit more exactly where the wrong values come from? Is there some AIX tool you can use to look at the XCOFF debug info directly to compare with what GDB is reading? Bye, Ulrich --_000_CH2PR15MB35442EE01CC59A685984437FD6609CH2PR15MB3544namp_--