This is the mail archive of the gdb-patches@sources.redhat.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]
Other format: [Raw text]

Re: [patch] New m32r remote target, m32rsdi


Andrew, Sorry for a late reply.


> * remote-m32r-sdi.c : New file, interface to m32r on-chip

>> debug interface, SDI (Scalable Debug Interface).
>> * Makefile.in (remote-m32r-sdi.o): Add build rule.
>> * config/m32r/m32r.mt (TDEPFILES) : Add remote-m32r-sdi.o.

:


Kei, Sorry for the delay, I think 6.0 is done for ....
 From the external interface interface viewpoint, I've noticed a few things:

- it has a custom serial [socket] interface
Is there a reason to not use serial.[hc]?  All new targets should use a
common interface (in fact I think I just deleted the last target that
didn't :-) as by doing this the user gets more consistent behavior.


There is no special reaseon. So I've modified my patch to use serial.[hc].

Thanks!


- it isn't documented
Probably just a line or two after the doco for "target m32r" in
doc/gdb.texinfo.

- it isn't async
Look at remote.c:remote_async_wait (although as far examples go it may
not help much) and notice how, for 'O' packets, it returns:
           /* Return immediately to the event loop. The event loop will
              still be waiting on the inferior afterwards. */
           status->kind = TARGET_WAITKIND_IGNORE;
If this target is going to last, it's going to need to eventually become
async (just not immediatly).  Please don't be suprized if, at some stage
  in the not to distant future, I start making noises about this.


Refering async target in remote.c, I'm implementing the asyncronized version
of m32r new remote target. But I noticed the async target didn't work correctly.

"so we're on the same page", right now there's now real rush with this one. More that it will happen so you'll want to be ready.


cat hello.c

main() { printf("hello, world\n"); }

gcc -g hello.c
~/gdb-20031001/build/gdb/gdbserver/gdbserver localhost:2345 a.out

Process a.out created; pid = 8522


From another terminal:


~/gdb-20031001/build/gdb/gdb a.out

GNU gdb 20031001 Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) target async localhost:2345
Remote debugging using localhost:2345
0x40001e10 in ?? ()
(gdb) break main
Breakpoint 1 at 0x8048358: file hello.c, line 4.
(gdb) c
Continuing.
The program is running.  Exit anyway? (y or n) n
Not confirmed.
(gdb)


Is the async target under development? If so, is there any other remote target I can refer as a example of asynchronized remote targets?

Its development stalled and lack of use has clearly broken it :-( Something else for me to fix I guess.


Can you post what you've got, without worrying about the ASYNC part.

Andrew



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