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]

Re: [PATCH v2] gdb: ADI support


On 06/21/2017 10:46 AM, Yao Qi wrote:
> Wei-min Pan <weimin.pan@oracle.com> writes:
> 

> 
>>>
>>> You can't access /proc in *-tdep.c file, because it is also compiled for
>>> cross-debugger.  The rule in general is to move it to sparc64-linux-nat.c.
>>>   
>> It's nice to know. Will look into it. BTW is there any document that
>> specifies/defines these rules for
>> *-tdep.c and *-nat.c files?
> 
> I was puzzled by this for several years when I started on GDB :)  The
> most relevant one is
> https://sourceware.org/gdb/wiki/Internals%20Native-Debugging  In short,
> anything required in native debugging (gdb and program are running on
> the same machine) should be put in *-nat.c.  The rest of things related
> to this arch should be put into *-tdep.c.  Note some ports have
> *-linux-nat.c and *-linux-tdep.c, the former is about anything required
> in Linux native debugging (gdb and the program is running on the same Linux
> machine), while the latter is about debugging a program running on Linux
> of that arch.
> 

There's also:
 https://sourceware.org/gdb/wiki/Internals/Source%20Tree%20Structure

I've extended the tdep section a bit now, and added something about
unit tests too, while at it:
 https://sourceware.org/gdb/wiki/Internals/Source%20Tree%20Structure?action=diff&rev1=7&rev2=8

Thanks,
Pedro Alves


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