This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, I have a few patches that will make 64 BIT gdb work better in powerpc64-ibm-aix native configuration. Attached with this mail is a tar-ball containing all the patches and also a separate changelog. (See attached file: gdb_patches.tar.gz) There are 2 patches related to bfd changes also present in the above tar. They provide core handling support for 64 bit gdb on powerpc64-ibm-aix. Will that be reviewed by this community ? Once reviewed and accepted, I will work with the contacts within IBM who are approved contributors for GDB to get the code checked-in. A brief description about every patch is given with the patch itself. The purpose of every patch (excluding the two related to bfd changes) is highlighted below - gdb-7.6-xcoffread_line_nos.patch - This fixes a problem that gdb faces while debugging xlc compiled binaries. XLC generates a line table which is different when compared to gcc. It does not contain one extra line entry for function start addresses unlike gcc generated line tables. This causes commands like setting breakpoints at functions 'break <function_name> ' or listing the source by using commands like 'list <function_name>' give wrong results for xlc compiled binaries. This patch fixes that by modifying the way gdb processes the line table entries in case of xlc compiled binaries. Testing - test cases like testsuite/gdb.base/list.exp and break.exp when compiled with xlc reflects these changes Files Modified - gdb/xcoffread,c gdb-7.6-xcoffread_symtab.patch - This patch makes gdb skip reading symbols starting with @FIX which are used as TOC references in AIX. Also, the correct auxiliary entry is not read from the symbol information when we debug a binary compiled with the 'xlc -qfuncsect' or 'gcc --ffunction-sections and this causes the file name to be read wrongly as " __start__" . So basically, debugging a binary which is compiled with options a cited above is not possible. The problem can be reproduced if you try debugging a binary compiled with ' xlc -qfuncsect' or 'gcc --ffunction-sections' options on AIX. Applying this patch fixes this issue. Files Modified - gdb/xcoffread,c gdb-7.6-ppc64aix.patch - This is a patch that adds a new host and target to GDB. Support for powerpc64-ibm-aix* has been added in the configure files. A new host configuration file called gdb/config/powerpc/ppc64-aix.mh has been added to support Host: IBM PowerPC 64 BIT running AIX. Files Modified - gdb/configure.ac , gdb/configure.host, gdb/configure.tgt Files Added - gdb/config/powerpc/ppc64-aix.mh gdb-7.6-aix64-thread.patch - gdb/aix-thread.c has many ptrace calls like - 'ptrace32 (PTT_WRITE_SPRS, tid, (int *) &sprs32, 0, NULL)'. In 64 Bit mode this has to be changed to 'ptrace32 (PTT_WRITE_SPRS, tid, (long long) &sprs32, 0, NULL)' Similar changes need to be made at many places in this file. Instead of making multiple '#ifdef BFD64 ' checks through out the file, I thought it would be a better idea to create a new file gdb/aix64-thread.c which will be pulled in by configure if gdb is being compiled in a native powerpc64-ibm-aix configuration. This new file is derived from gdb/aix-thread.c and will be compiled only if gdb is built in native powerpc64-ibm-aix configuration. Files Added - gdb/aix64-thread.c gdb-7.6-inf-ptrace64.patch - Same purpose as the previous patch but for file gdb/inf-ptrace.c. Files Added - gdb/inf-ptrace64.c ChangeLog --- * configure.tgt (powerpc64-*-aix*): Match powerpc64 running aix. * configure.host (powerpc64-*-aix*): Likewise. * config/powerpc/ppc64-aix.mh: New File for powerpc running aix host. * aix64thread.c: New File (Derived from aix-thread.c) For 64 bit (BFD64) support. * configure (CONFIG_SRCS): Add check for powerpc64 running aix while adding aix-thread.c to CONFIG_SRCS. * inf-ptrace64.c: New File (Derived from inf-ptrace.c) For 64 bit (BFD64) support. * rs6000-nat.c: Check for __ld_info64 if compiling 64 BIT gdb. (rs6000_ptrace32): Added BFD64 for 64 bit support. (rs6000_ptrace64): Likewise. * gdb_ptrace.h: Add macro for ptrace64 call. * xcoffread.c (read_xcoff_symtab): Make fcn_start_addr large enough to hold 64-bit address. Make name of current file as pst->filename instead of _start_. Skip reading symbols starting with @FIX. Read correct auxilliary entry if the entries are more than 1 in cases when binaries are compiled with xlc -qfunct. (process_linenos): Add fix to correctly process linenos in case of xlc compiled binaries. Kindly Review the above changes so these fixes can go upstream and make gdb 64 bit work better on AIX. Thanks & Regards, Raunaq M. Bathija
Attachment:
gdb_patches.tar.gz
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |