This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
How to connect GDB with Redboot
- To: ecos-discuss at sourceware dot cygnus dot com
- Subject: [ECOS] How to connect GDB with Redboot
- From: ness <root at t2-design dot com>
- Date: Tue, 31 Oct 2000 12:01:02 +0800 (CST)
Hi Jifl and Jesper.
First ,thank you for your advice.
I use the PMON to debug the redboot.srec. Now the program can go to
cyg_start, and executes the loop successfully. And the net is working
right. But I can't input redboot's command. And we just need ethernet
debug, so I just need the module which can connect with GDB, and no input
is not problem. Is it right?
I think when res==0,the program go to the condition waiting connection
from the GDB. Am I right?
But when the program executes the "breakpoint()" ,it stops. Do I need to
do something for the virtual vector table or other?
Many thanks!
Ness
while (true) {
if (prompt) {
printf("RedBoot> ");
prompt = false;
}
res = gets(line, sizeof(line), 250);
if (res < 0) {
// No input arrived
#ifdef CYGPKG_REDBOOT_NETWORKING
if (have_net) {
// Check for incoming TCP debug connection
net_io_test();
}
#endif
} else {
if (res == 0) {
// Special case of '$' - need to start GDB protocol
CYGACC_CALL_IF_SET_CONSOLE_COMM(cur);
breakpoint(); // Get GDB stubs started, with a proper
environment, etc.
} else {
if (strlen(line) > 0) {
if ((cmd = parse(line, &argc, &argv[0])) != (struct
cmd *)0) {
(cmd->fun)(argc, argv);
} else {
printf("Illegal command: %s\n", line);
}
}
prompt = true;
}
}