* Unixware gdb/procfs.c patch - v3
@ 2002-01-17 17:14 rbrown64
2002-01-17 17:48 ` Michael Snyder
0 siblings, 1 reply; 2+ messages in thread
From: rbrown64 @ 2002-01-17 17:14 UTC (permalink / raw)
To: gdb-patches; +Cc: Michael Snyder
procfs.c hides the particular type of process status structure in
the gdb_prstatus_t typedef. Push this information hiding into
bfd/elf.c(elfcore_write_gdb_prstatus) exporting one interface.
No regressions on UnixWare 7.1.0 and Solaris 2.7 with this and the
matching bfd/elf.c patch.
2001-01-18 Rodney Brown <rbrown64@csc.com.au>
* procfs.c: Prototype elfcore_write_gdb_prstatus,
elfcore_write_prfpreg, elfcore_write_prpsinfo.
(procfs_do_thread_registers): Call elfcore_write_gdb_prstatus.
--- procfs.c.orig Tue Jan 15 15:01:48 2002
--- procfs.c.orig Tue Jan 15 15:01:48 2002
+++ procfs.c Thu Jan 17 16:59:00 2002
@@ -55,7 +55,7 @@ Inc., 59 Temple Place - Suite 330, Bosto
* Unixware
* AIX5
*
- * /proc works by immitating a file system: you open a simulated file
+ * /proc works by imitating a file system: you open a simulated file
* that represents the process you wish to interact with, and
* perform operations on that "file" in order to examine or change
* the state of the other process.
@@ -325,6 +325,10 @@ typedef prstatus_t gdb_prstatus_t;
typedef prstatus_t gdb_lwpstatus_t;
#endif /* NEW_PROC_API */
+char *elfcore_write_gdb_prstatus (bfd *, char *, int *, long, int, void *);
+char *elfcore_write_prfpreg (bfd *, char *, int *, void *, int);
+char *elfcore_write_prpsinfo (bfd *, char *, int *, char *, char *);
+
typedef struct procinfo {
struct procinfo *next;
int pid; /* Process ID */
@@ -5733,12 +5737,12 @@ procfs_do_thread_registers (bfd *obfd, p
merged_pid = TIDGET (ptid) << 16 | PIDGET (ptid);
fill_gregset (&gregs, -1);
- note_data = (char *) elfcore_write_prstatus (obfd,
- note_data,
- note_size,
- merged_pid,
- stop_signal,
- &gregs);
+ note_data = (char *) elfcore_write_gdb_prstatus (obfd,
+ note_data,
+ note_size,
+ merged_pid,
+ stop_signal,
+ &gregs);
fill_fpregset (&fpregs, -1);
note_data = (char *) elfcore_write_prfpreg (obfd,
note_data,
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Unixware gdb/procfs.c patch - v3
2002-01-17 17:14 Unixware gdb/procfs.c patch - v3 rbrown64
@ 2002-01-17 17:48 ` Michael Snyder
0 siblings, 0 replies; 2+ messages in thread
From: Michael Snyder @ 2002-01-17 17:48 UTC (permalink / raw)
To: rbrown64; +Cc: gdb-patches
rbrown64@csc.com.au wrote:
>
> procfs.c hides the particular type of process status structure in
> the gdb_prstatus_t typedef. Push this information hiding into
> bfd/elf.c(elfcore_write_gdb_prstatus) exporting one interface.
>
> No regressions on UnixWare 7.1.0 and Solaris 2.7 with this and the
> matching bfd/elf.c patch.
Rodney, this merely exports the ugliness from procfs.c into bfd.
I would strongly prefer not to do that. Is there a reason why
you don't want to do this the way I suggested (by using an
ifdef NEW_PROC_API)? That is the single macro that is used
to select between the two /proc API's in the whole procfs module.
>
> 2001-01-18 Rodney Brown <rbrown64@csc.com.au>
> * procfs.c: Prototype elfcore_write_gdb_prstatus,
> elfcore_write_prfpreg, elfcore_write_prpsinfo.
> (procfs_do_thread_registers): Call elfcore_write_gdb_prstatus.
>
> --- procfs.c.orig Tue Jan 15 15:01:48 2002
> --- procfs.c.orig Tue Jan 15 15:01:48 2002
> +++ procfs.c Thu Jan 17 16:59:00 2002
> @@ -55,7 +55,7 @@ Inc., 59 Temple Place - Suite 330, Bosto
> * Unixware
> * AIX5
> *
> - * /proc works by immitating a file system: you open a simulated file
> + * /proc works by imitating a file system: you open a simulated file
> * that represents the process you wish to interact with, and
> * perform operations on that "file" in order to examine or change
> * the state of the other process.
> @@ -325,6 +325,10 @@ typedef prstatus_t gdb_prstatus_t;
> typedef prstatus_t gdb_lwpstatus_t;
> #endif /* NEW_PROC_API */
>
> +char *elfcore_write_gdb_prstatus (bfd *, char *, int *, long, int, void *);
> +char *elfcore_write_prfpreg (bfd *, char *, int *, void *, int);
> +char *elfcore_write_prpsinfo (bfd *, char *, int *, char *, char *);
> +
> typedef struct procinfo {
> struct procinfo *next;
> int pid; /* Process ID */
> @@ -5733,12 +5737,12 @@ procfs_do_thread_registers (bfd *obfd, p
> merged_pid = TIDGET (ptid) << 16 | PIDGET (ptid);
>
> fill_gregset (&gregs, -1);
> - note_data = (char *) elfcore_write_prstatus (obfd,
> - note_data,
> - note_size,
> - merged_pid,
> - stop_signal,
> - &gregs);
> + note_data = (char *) elfcore_write_gdb_prstatus (obfd,
> + note_data,
> + note_size,
> + merged_pid,
> + stop_signal,
> + &gregs);
> fill_fpregset (&fpregs, -1);
> note_data = (char *) elfcore_write_prfpreg (obfd,
> note_data,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-01-18 1:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-17 17:14 Unixware gdb/procfs.c patch - v3 rbrown64
2002-01-17 17:48 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox