Path: chuka.playstation.co.uk!scea!peter_alau@playstation.sony.com From: Michael Briere Newsgroups: scea.yaroze.beginners Subject: Re: GDB DEBUGGER Date: Mon, 13 Jul 1998 15:21:03 -0400 Organization: SCEA News Server Lines: 263 Message-ID: <35AA5E1F.BEB05129@accessv.com> References: <35A82BA0.C6A8D35C@accessv.com> <35A83EEC.4ABE@charlie.cns.iit.edu> <35A8E41B.E77910F8@accessv.com> <35A8E671.67A5@charlie.cns.iit.edu> NNTP-Posting-Host: 90.209.135.80.dialup.accessv.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.04 [en] (Win95; I) Guys, you're both great. I'm still not successful yet though. here's a copy of my gdb.ini file. As you can see I've changed from com1 to com4. Anything else I should change here? Am I missing something? Thanks once again! > # sample gdb script of %HOME%/gdb.ini for DTL-H3000 > > echo \n\nAdding definitions for remote PSX debugging (See %HOME%/gdb.ini)\n > > define start-remote-debugging > set remotebaud 115200 > target hss com4 > end > > document start-remote-debugging > start remote PSX debugging (115.2Kbps, COM4) > end > > # echo \ dr (display registers)\n > define dr > > printf " $0-%08x %08x %08x %08x %08x %08x %08x %08x\n", \ > $zero, $at, $v0, $v1, $a0, $a1, $a2, $a3 > printf " $8-%08x %08x %08x %08x %08x %08x %08x %08x\n", \ > $t0, $t1, $t2, $t3, $t4, $t5, $t6, $t7 > printf "$16-%08x %08x %08x %08x %08x %08x %08x %08x\n", \ > $s0, $s1, $s2, $s3, $s4, $s5, $s6, $s7 > printf "$24-%08x %08x %08x %08x %08x %08x %08x %08x\n", \ > $t8, $t9, $k0, $k1, $gp, $sp, $fp, $ra > > printf " $cr = %08x ", $cr > if $cr & 0x80000000 > printf " BD" > end > printf " CE%d", ($cr & 0x30000000) >> 28 > if $cr & 0x0000ff00 > printf " IP" > if $cr & 0x00008000 > printf "5" > end > if $cr & 0x00004000 > printf "4" > end > if $cr & 0x00002000 > printf "3" > end > if $cr & 0x00001000 > printf "2" > end > if $cr & 0x00000800 > printf "1" > end > if $cr & 0x00000400 > printf "0" > end > if $cr & 0x00000300 > printf "S" > if $cr & 0x00000200 > printf "1" > end > if $cr & 0x00000100 > printf "0" > end > end > printf " " > end > printf " " > if ($cr & 0x0000003c) == (0 << 2) > printf "External interrupt" > end > if ($cr & 0x0000003c) == (4 << 2) > printf "Address error (load/instruction-fetch)" > end > if ($cr & 0x0000003c) == (5 << 2) > printf "Address error (store)" > end > if ($cr & 0x0000003c) == (6 << 2) > printf "Bus error (instruction-fetch)" > end > if ($cr & 0x0000003c) == (7 << 2) > printf "Bus error (load/store)" > end > if ($cr & 0x0000003c) == (8 << 2) > printf "Syscall" > end > if ($cr & 0x0000003c) == (9 << 2) > printf "Breakpoint" > end > if ($cr & 0x0000003c) == (10 << 2) > printf "Reserved instruction" > end > if ($cr & 0x0000003c) == (11 << 2) > printf "Coprocessor unusable" > end > if ($cr & 0x0000003c) == (12 << 2) > printf "Arithmetic overflow" > end > printf "\n" > > printf " $sr = %08x ", $sr > if ($sr & 0xf0000000) > printf " Cu" > if ($sr & 0x80000000) > printf "3" > end > if ($sr & 0x40000000) > printf "2" > end > if ($sr & 0x20000000) > printf "1" > end > if ($sr & 0x10000000) > printf "0" > end > end > if ($sr & 0x00400000) > printf " BEV" > end > if ($sr & 0x00200000) > printf " TS" > end > if ($sr & 0x00100000) > printf " PE" > end > if ($sr & 0x00080000) > printf " CM" > end > if ($sr & 0x00040000) > printf " PZ" > end > if $sr & 0x0000ff00 > printf " IM" > if $sr & 0x00008000 > printf "5" > end > if $sr & 0x00004000 > printf "4" > end > if $sr & 0x00002000 > printf "3" > end > if $sr & 0x00001000 > printf "2" > end > if $sr & 0x00000800 > printf "1" > end > if $sr & 0x00000400 > printf "0" > end > if $sr & 0x00000300 > printf "S" > if $sr & 0x00000200 > printf "1" > end > if $sr & 0x00000100 > printf "0" > end > end > end > if ($sr & 0x00000030) > printf " " > if ($sr & 0x00000020) > printf "KU" > end > if ($sr & 0x00000010) > printf "IE" > end > printf "o" > end > if ($sr & 0x0000000c) > printf " " > if ($sr & 0x00000008) > printf "KU" > end > if ($sr & 0x00000004) > printf "IE" > end > printf "p" > end > if ($sr & 0x00000003) > printf " " > if ($sr & 0x00000002) > printf "KU" > end > if ($sr & 0x00000001) > printf "IE" > end > printf "c" > end > printf "\n" > > printf " $pc = %08x\n", $pc > > # printf " $hi=%08x $lo=%08x $bad=%08x $s8=%08x\n", $hi, $lo, $bad, $s8 > # > > printf " " > x/i $pc - 8 > printf " " > x/i $pc - 4 > printf " ->" > x/i $pc > printf " " > x/i $pc + 4 > printf " " > x/i $pc + 8 > > end > document dr > display registers > end > > # echo \ si (stepi and dr)\n > define si > stepi > dr > end > document si > stepi and display registers (dr) > end > > # echo \ ni (nexti and dr)\n > define ni > nexti > dr > end > document ni > nexti and display registers (dr) > end > Toby Hutton wrote: > Ed Federmeyer writes: > > > > If some kind person could take the actual GDB source that was used > > to make the Yaroze PC disc, and just fix it so it "knows about" > > COM2, COM3, and COM4, that would be a very cool thing! > > gdb reads a file called .gdbinit at startup, from the current > directory or your home directory (which is set by DJGPP.BAT, AFAIR). > Sony supplied a .gdbinit, although under DOS I imagine it's called > _gdbinit or gdb.ini, which initialises some settings and creates some > macros specifically for debugging the Yaroze over the serial line. > > Now, I reckon if you can find this file on your system, you should > find that you can configure the default com port in there. > > You should also be able to specify the com port at the gdb prompt, > with a command similar to 'target hss com1', or 'target remote com1'. > > I haven't used gdb with the Yaroze for a few months, and definitely > not for ages under DOS, so this info is off the top of my head where a > fuzzy vagueness reigns and may be slightly off target. Hope it helps, > though. > -- > Toby.