This is the mail archive of the gdb@sourceware.cygnus.com 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]

Re: Process ID munging


David Taylor wrote:
> 
>     Date: Wed, 26 Apr 2000 15:51:00 +1000
>     From: Andrew Cagney <ac131313@cygnus.com>
> [...]
>     The short term bandaid most likely involves changing that PID to a
>     LONGEST (or a typedef LONGEST ...).  Longer term, it is going to need a
>     more radical treatment.
> 
>     Instead of the current integer, a thread object that has bound to it
>     things like its architecture, its symbol information, its address map,
>     its target interface and even its cached register/memory information.
>     Implementing it involves some careful thought and a serious amount of
>     strategizing (.... :-).
> 
> How about something like...
> 
>     struct process
>     {
>         pid_t p_pid; /* make it an int if pid_t causes too many problems */
>         int p_tid;
>         ... other fields to be determined later ...
>     }
> 
>     struct process *current_process;
> 
>     #define inferior_pid current_process->p_pid
> 
> Wouldn't that get us more than 90% there?
> 
> Yes, I realize that there are still issues.  But, it seems that if you
> did something like this that most files would require no editing...

Like making it longest, it would get us part of the way there.

(FWIW, I'm less afraid of editing now than I was a year ago, being able
to comple with -Werror -W... adds a certain degree of confidence :-)

Any way, per other posting (picture of GDB's design), I'm going to try
to cook up some sort of diagram showing what GDB should look like so
that we all know where we think we're going.  I'd rather hold of adding
another key gdb object until we know where / how it fits in.

	enjoy,
		Andrew

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