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]

[RFC/commit] Getting rid of tm-rs6000.h (PROCESS_LINENUMBER_HOOK)


Hello,

There is only one macro left in tm-rs6000.h, which is:

    /* In xcoff, we cannot process line numbers when we see them. This is
       mainly because we don't know the boundaries of the include files. So,
       we postpone that, and then enter and sort(?) the whole line table at
       once, when we are closing the current symbol table in end_symtab(). */
    
    #define PROCESS_LINENUMBER_HOOK()       aix_process_linenos ()
    extern void aix_process_linenos (void);

The AIX port is the only port that defines this macro, and it's only
used in one place: buildsym.c:end_symtab(). I think the most appropriate
way to define this notion is as a gdbarch method, set only in the case
of AIX. This is what this patch does.

I must say that I am really bad at finding names. I did my best for
the name of the gdbarch method, but better suggestions would be very
much appreciated.

2007-09-18  Joel Brobecker  <brobecker@adacore.com>

        * gdbarch.sh: Add new buildsym_linetable_hook gdbarch function.
        * gdbarch.h, gdbarch.c: Regenerate.
        * buildsym.c (end_symtab): Replace use of PROCESS_LINENUMBER_HOOK
        by use of gdbarch_buildsym_linetable_hook.
        * xcoffread.h: New file.
        * xcoffread.c: Add include of xcoffread.h.
        * rs6000-aix-tdep.c: Add include of xcoffread.h.
        (rs6000_aix_init_osabi): Set buildsym_linetable_hook gdbarch function.
        * Makefile.in (xcoffread_h): New variable.
        (rs6000-aix-tdep.o): Add dependency on xcoffread.h.
        (xcoffread.o): Likewise.
        * config/powerpc/aix.mt (DEPRECATED_TM_FILE): Delete.
        * config/rs6000/tm-rs6000.h: Delete.

The associated documentation update is pretty straightforward.

2007-09-18  Joel Brobecker  <brobecker@adacore.com>

        * gdbint.texinfo (Target Conditionals): Remove documentation
        of PROCESS_LINENUMBER_HOOK.

This was tested on powerpc-aix. Does it look good?

Thanks,
-- 
Joel

Attachment: aix-hook.diff
Description: Text document

Attachment: xcoffread.h
Description: Text document

Attachment: aix-hook-doc.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]