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] New inf-procfs module (replacing procfs)


Hello,

As discussed recently, I have slightly updated the procfs module
to follow the example of inf-ptrace for instance.

I thought that this cleanup deserved a rename of the file, to keep
it in line with the rest, so I propose the addition of two new files
inf-procfs.h, and inf-procfs.c. inf-procfs.c is very close to what
procfs.c was. The main difference is that the target vector created
by procfs is not added to the target stack by procfs anymore. This
is delegated to the various -nat modules using procfs, so that they
can override any method they like. Just to prove my point, I'm
attaching an extra patch that shows the diffs between procfs.c
and my inf-procfs.c.

This is only an RFC, the change is not complete (yet). I just want
to make sure that I'm on the right track, and implement any suggestion
if there are any.

Note about inf-procfs. I think certain comments should be reformatted,
but I have deliberatly left them alone for now, to minimize the size
of the diff. Will take care of that later. Also, building this file
generates some warnings, some of them being related to the move to
gdb_byte. I will also take care of that later for the same reason.

The attached patch has been tested on sparc-solaris2.8, and the
testsuite only showed some variations in the threads section. It
really looks normal.

2006-01-13  Joel Brobecker  <brobecker@adacore.com>

        * inf-procfs.h: New file.
        * inf-procfs.c: New file, mostly identical to procfs.c.
        * procfs.c: Delete this file, no longer used.
        * sparc-sol2-nat.c: Include target.h and inf-procfs.h.
        (_initialize_sparc_sol2_nat): New procedure.
        * config/sparc/sol2.mh (NATDEPFILES): Replace procfs.o by inf-procfs.o.
        * Makefile.in (inf_procfs_h): New variable.
        (inf-procfs.o): New rule.
        (sparc-sol2-nat.o): Update dependencies.
        * sol-thread.c: Remove useless forward declarations.
        procfs_ops is now a pointer, so update the code throughout accordingly.

Am I on the right track?

Thanks,
-- 
Joel

Attachment: inf-procfs.h
Description: Text document

Attachment: inf-procfs.c
Description: Text document

Attachment: inf-procfs.diff
Description: Text document

Attachment: procfs-vs-inf-procfs.diff
Description: Text document


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