public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Jens-Christian Lache <lache@tu-harburg.de>
To: crossgcc@sources.redhat.com, gdb@sources.redhat.com,
	insight@sources.redhat.com, newlib@sources.redhat.com
Subject: Re: Debugging with ANGEL
Date: Wed, 15 Nov 2000 05:56:00 -0000	[thread overview]
Message-ID: <00111514532502.01686@lab04> (raw)
In-Reply-To: <Pine.HPX.4.21.0011151426430.8611-100000@erasmus.rz.tu-harburg.de>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2890 bytes --]

Hi! I still haven´t fixed the problem yet, but I can avoid the deadlock now.
It appears on the second swi instruction in
"initialise_monitor_handles" @ 0xZZZZ8fd0 (where 0xZZZZ0000) is the
adress, where my program is linked to) in 
 newlib-1.8.2/newlib/libc/sys/arm/syscalls.c

After the swi, the pc jumps back to the beginning of the instruction. This 
would happen forever, if I would´t set the pc to the next instruction.
The variable monitor_stdin is set to 3,  monitor_stout and monitor_stderr
are set to 33558724 a few instr. later. If I set them to 0 by hand, I can use 
->{} (Continue) to get to the breakpoint at main.

What can I do to make stdin, stdout and stderr make work correctly?

(To which mailing list does this message belong?)

Am Mit, 14 Nov 2000 schrieben Sie:
> I'm trying to debug an arm-elf program on a ARM7TDMI based
> testboard with insight-5.0. I can download my own program,
> but when debugging, I can not reach the breakpoint at main.
> 
> I receive the following message:
> 
> ! Program received signal SIGTRAP, Trace/breakpoint trap
> 
> -> syscalls.c Line 65 
> 59	#ifdef ARM_RDI_MONITOR
> 60	
> 61	static inline int
> 62	do_AngelSWI (int reason, void * arg)
> 63	{
> 64	  int value;
> 65	  asm volatile ("mov r0, %1; mov r1, %2; swi %a3; mov %0, r0"
> 66	       : "=r" (value) /* Outputs */
> 67	       : "r" (reason), "r" (arg), "i" (AngelSWI) /* Inputs */
> 68	       : "r0", "r1", "lr"
> 69			/* Clobbers r0 and r1, and lr if in supervisor mode
> 70	*/);   return value;
> 71	}
> 72	#endif /* ARM_RDI_MONITOR */
> 
> 
> Stack: initialise_monitor_handles
> PC: 0x02018cb0
> 
> (newlib-1.8.2/newlib/libc/sys/arm/syscalls.c)
> 
> I can set breakpoints before the error occurs and step next. It looks like 
> after every instruction there occurs a SWI (to do the communication with me I
> guess). The line 65 in syscalls.c is executed quite often, but finally I loose
> the connection and the board is deadlocked. 
> 
> When I set a breakpoint at 
>  void initialise_monitor_handles(void)
> the debugger shows an other strange behavior: It exectutes line 103-105:
>   block[0] = (int) ":tt";
>   block[2] = 3;     /* length of filename */
>   block[1] = 0;     /* mode "r" */
> and than it jumps back to line 103. It executes the lines one more
> time, than executes line 108-110:
>   block[0] = (int) ":tt";
>   block[2] = 3;     /* length of filename */
>   block[1] = 4;     /* mode "w" */
> and jumps back to line 106:
>   monitor_stdin = do_AngelSWI (AngelSWI_Reason_Open, block);
> then it jumps to line 111:
>   monitor_stdout = monitor_stderr = do_AngelSWI (AngelSWI_Reason_Open, block);
> back to 106, line 65 and ciao bella...
> 
> Any hints? 
> 
> Jens-Christian
> 
> 
> Jens-Christian Lache
> Technische Universitaet Hamburg-Harburg
> www.tu-harburg.de/~sejl1601
> Mail:
> lache@tu-harburg.de
> lache@ngi.de
> Tel.: 
> +0491759610756
>

       reply	other threads:[~2000-11-15  5:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.HPX.4.21.0011151426430.8611-100000@erasmus.rz.tu-harburg.de>
2000-11-15  5:56 ` Jens-Christian Lache [this message]
     [not found]   ` <3A12B912.3864E7BA@cygnus.com>
2000-11-15 10:12     ` Jens-Christian Lache
2000-11-15 15:27     ` Fernando Nasser
2000-11-14 23:49 Jens-Christian Lache

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00111514532502.01686@lab04 \
    --to=lache@tu-harburg.de \
    --cc=crossgcc@sources.redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=insight@sources.redhat.com \
    --cc=newlib@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).