This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: Trouble cross debugging


--- Dan Kegel <dank@kegel.com> wrote:

> On 2/18/06, EJS <ejshoor@yahoo.com> wrote:
> > I am using the standard gdbserver on the target.
> 
> Maybe you have to use the gdbserver built by
> crosstool?
> 
Thanks Dan.  I just tried using the gdbserver built by
crosstool and it did not make a difference. However, I
did notice I am actually able to step though the code,
well at least some parts of it. Here is the actual
code:
#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Hello World\n");
    //block until user types something so I have time
to attach the debugger
    fgetc(stdin);
    printf("Hello World2\n");
    return 0;
}

Normally, I attach to the program while it is waiting
for user input which is where the backtrace from above
comes. This time, I set a breakpoint at the second
print statement and I continue through to it. Then I
can actually step through the rest of the program.  I
still assume my problem is related to search paths(I
dont 100% understand where I should be pointing
solib-search-path and solib-absolute-prefix), but I
wonder if it is something specific to fgetc.

Any ideas?

Thanks again,
J

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.org


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