This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos 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: MIPS32 gdb vectors question


Here is a brief outline of the issue
1) Downloaded gdb 5.3 and compiled on cygwin platform under XP.
2) used mipsisa32-elf-gdb to connect to the eCOS platform via serail 38400
baud, yeilded a packet too long.  Submitted question to eCOS discuss list
3) A patch was submitted fixing MIPS sub
4) used CVS to pull download new eCOS, merged new MIPS32 HAL and recomplied
Redboot then downloaded to plaform.
5) tested mipsisa32-elf-gdb and got this error:

(gdb) target remote com2
Remote debugging using com2
Remote packet too long:
00000000b8060000000000018003e2308000d53883fffff0800451a0
00000001fff0e4ff000f4240b802801800002710000000648004000008000000000000aa0000
0002
800004000000000080040000800400000000000080000400fffffffd00000000000000012e21
088c
79a43a40800451a083ffffd04040000080000ee410006c02000f424000000000444000241000
0024
8000d53c00000000000000000000000000000000000000000000000000000000000000000000
0000
0000000000000000000000000000000000000000000000000000000000000000000000000000
0000
0000000000000000000000000000000000000000000000000000000000000000000000000000
0000
00000000000000000000000000000000000000000000000000000000000000000000000e0100
0017
0104001708a2200001ffe00000000000c0c0c0064440002426e03e6340000000012008411000
6c02
100000248000d538000180098005808001000000000000000000000
Remote packet too long:
00000000b8060000000000018003e2308000d53883fffff0800451a0

7) Stared tracing via insight mipsisa32-elf-gdb, found out that:
The issue is the number of registers in gdb it is defined as  PC_REGNUM 37
(tm-mips.h)
In mips-tdep.c in gdb source
764 mips_read_pc (ptid_t ptid)
- 765 {
- 766   return read_signed_register_pid (PC_REGNUM, ptid);
- 767 }

Changed  mips-regs.h NUMREGS from 107 to 37

If I change mips-stub.h to #if defined(CYGPKG_HAL_MIPS_GDB_REPORT_CP0)
#define NUMREGS   37
#else
#define NUMREGS    37
#endif
8) Recompiled Redboot and downloaded to platform.  GDB now is connecting to
the platform.

Further tracing needs to be done on my part, what is confusing, is no else
is seeing this problem with gdb 5.3? I'll recompile gdb 5.3 again and
retrace and provide better flow of what is happening.

tmichals



-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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