public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] Breakpoint problem
@ 2000-10-20  2:03 Andreas.Karlsson
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas.Karlsson @ 2000-10-20  2:03 UTC (permalink / raw)
  To: jskov; +Cc: ecos-discuss

The problem was too small stacksizes.



> == Andreas Karlsson <Andreas.Karlsson@combitechsystems.com> writes:

> 

> Andreas> Hi, When I set breakpoints in my code the gdb crashes with a

> Andreas> 'Program received signal SIGTRAP, Trace/breakpoint trap'.

> 

> This happens if the target hits a breakpoint at an address where GDB

> didn't put one. And I'm sure you mean that the target crashes with

> that output, not GDB. Right?

> 

> What is the address? By any chance, is that the address you first see

> when connecting to the target? If so, the target was reset, which

> obviously confuses GDB.

> 

> Andreas> It is possible to set breakpoints early in the code.

> 

> Yes. No. Maybe. Hard to say without more information.

> 

> Jesper

> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] Breakpoint problem
  2002-02-12  0:58 N.Suresh
@ 2002-02-14 11:18 ` Jonathan Larmour
  0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Larmour @ 2002-02-14 11:18 UTC (permalink / raw)
  To: N.Suresh; +Cc: bshiva, rprakash, ecos-discuss

"N.Suresh" wrote:
>     *)  When we execute (gdb)  b main
>            It is just doing some memory access ('m' packets) and
> updating it's internal data structures.

Yes.

>     *)  When we execute (gdb) c
>            The host sends a 'Z' packet to actually put the breakpoint.
>            But we are not processing this inside the stub.

Why do you say that? Admittedly it does depend on whether the target
supports the Z packet. If it doesn't, then GDb should fall back to using
memory writes to set a breakpoint (i.e. 'M' packets).

> But even then
> the target stops at main and GDB prints the
>             line number properly.

So surely that shows that the breakpoint was set...

>     After hitting the breakpoint:
>     *)   When we execute (gdb) c     it is sending a 's' packet and our
> stub is executing the single_step function and
>      target gives some errors but if we continue the execution after
> that, "Hello World!" is printed. Any
>      breakpoints after that is not hit.
> 
>     My questions are :
> 
>      How the target is stopping even when we are not putting a
> breakpoint at the given location ?
>      Why is the host (gdb) sending 's' packet for the second continue
> command?

GDB always does that if you're stopped at a software breakpoint. It's so
that it can execute one instruction and *then* reinstate the breakpoint. If
it just set the breakpoint again immediately we would hit it immediately
and we execution wouldn't continue!

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ECOS] Breakpoint problem
@ 2002-02-12  0:58 N.Suresh
  2002-02-14 11:18 ` Jonathan Larmour
  0 siblings, 1 reply; 7+ messages in thread
From: N.Suresh @ 2002-02-12  0:58 UTC (permalink / raw)
  To: bshiva, rprakash, ecos-discuss

Hi all,
    I am testing GDB stubs on ADS8260 board. (I am downloading 'hello'
program using gdb)
    Following is the observations i made:

    *)  When we execute (gdb)  b main
           It is just doing some memory access ('m' packets) and
updating it's internal data structures.
    *)  When we execute (gdb) c
           The host sends a 'Z' packet to actually put the breakpoint.
           But we are not processing this inside the stub. But even then
the target stops at main and GDB prints the
            line number properly.
    After hitting the breakpoint:
    *)   When we execute (gdb) c     it is sending a 's' packet and our
stub is executing the single_step function and
     target gives some errors but if we continue the execution after
that, "Hello World!" is printed. Any
     breakpoints after that is not hit.

    My questions are :

     How the target is stopping even when we are not putting a
breakpoint at the given location ?
     Why is the host (gdb) sending 's' packet for the second continue
command?
     Any options to be enabled in the stub building or any version
mismatch ?

thanx in advance,


--
!============================================================================!
= Suresh N., Research Engineer, C-DoT, Bangalore.                            =
= Call me at : OFF: 2383951(Dir) / 2263399 (268)  RES: 3334248               =
= Alternate email :  nsur_mys@email.com                                      =
= QOT: For fast-acting relief, try slowing down.
!============================================================================!




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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [ECOS] Breakpoint problem
@ 2000-10-19  6:35 Andreas.Karlsson
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas.Karlsson @ 2000-10-19  6:35 UTC (permalink / raw)
  To: jskov, jlarmour; +Cc: ecos-discuss

The target is an AEB-1 revC. It have been working just fine for several
months so something has happened.



> -----Original Message-----
From: Jesper Skov [ mailto:jskov@redhat.com ]
Sent: den 19 oktober 2000 14:50
To: Karlsson Andre

> as
Cc: ecos-discuss@sourceware.cygnus.com
Subject: Re: [ECOS] Breakpoint problem


>>>>> "Andreas" 

> == Andreas Karlsson <Andreas.Karlsson@combitechsystems.com> writes:

> 

> Andreas> Hi, When I set breakpoints in my code the gdb crashes with a

> Andreas> 'Program received signal SIGTRAP, Trace/breakpoint trap'.

> 

> This happens if the target hits a breakpoint at an address where GDB

> didn't put one. And I'm sure you mean that the target crashes with

> that output, not GDB. Right?

Yes, you are right the message pops up in GDB but GDB still run.



> What is the address? By any chance, is that the address you first see

> when connecting to the target? If so, the target was reset, which

> obviously confuses GDB.

The address changes every time. Sometimes it is inside a process stack,
sometimes in any function and sometimes way out of memory.

> Yes. No. Maybe. Hard to say without more information.

I download 187 Kb.



Well, while trying to reproduce the error (It has been there for two days) I
figured out that it seems to be gone... 

I don't know why but anyway:) I've been doing some bug-fixing, without
breakpoints so someway I solved my problem (I hope).

Thanks anyway!



brgs

Andreas



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] Breakpoint problem
  2000-10-19  5:50 ` Jesper Skov
@ 2000-10-19  6:11   ` Jonathan Larmour
  0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Larmour @ 2000-10-19  6:11 UTC (permalink / raw)
  To: Jesper Skov; +Cc: Andreas.Karlsson, ecos-discuss

Jesper Skov wrote:
> 
> >>>>> "Andreas" == Andreas Karlsson <Andreas.Karlsson@combitechsystems.com> writes:
> 
> Andreas> Hi, When I set breakpoints in my code the gdb crashes with a
> Andreas> 'Program received signal SIGTRAP, Trace/breakpoint trap'.
> 
> This happens if the target hits a breakpoint at an address where GDB
> didn't put one. And I'm sure you mean that the target crashes with
> that output, not GDB. Right?
> 
> What is the address? By any chance, is that the address you first see
> when connecting to the target? If so, the target was reset, which
> obviously confuses GDB.

If this is a MIPS target, as I think it is, it may be an issue with sign
extension. I have a fix but I haven't checked it in yet as I'm unhappy with
it coz I haven't tested it enough and I think it may be break other
targets.

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] Breakpoint problem
  2000-10-19  4:55 Andreas.Karlsson
@ 2000-10-19  5:50 ` Jesper Skov
  2000-10-19  6:11   ` Jonathan Larmour
  0 siblings, 1 reply; 7+ messages in thread
From: Jesper Skov @ 2000-10-19  5:50 UTC (permalink / raw)
  To: Andreas.Karlsson; +Cc: ecos-discuss

>>>>> "Andreas" == Andreas Karlsson <Andreas.Karlsson@combitechsystems.com> writes:

Andreas> Hi, When I set breakpoints in my code the gdb crashes with a
Andreas> 'Program received signal SIGTRAP, Trace/breakpoint trap'.

This happens if the target hits a breakpoint at an address where GDB
didn't put one. And I'm sure you mean that the target crashes with
that output, not GDB. Right?

What is the address? By any chance, is that the address you first see
when connecting to the target? If so, the target was reset, which
obviously confuses GDB.

Andreas> It is possible to set breakpoints early in the code.

Yes. No. Maybe. Hard to say without more information.

Jesper

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ECOS] Breakpoint problem
@ 2000-10-19  4:55 Andreas.Karlsson
  2000-10-19  5:50 ` Jesper Skov
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas.Karlsson @ 2000-10-19  4:55 UTC (permalink / raw)
  To: ecos-discuss

Hi,

When I set breakpoints in my code the gdb crashes with a 'Program received
signal SIGTRAP, Trace/breakpoint trap'.

It is possible to set breakpoints early in the code.

Anyone has any idea of why, could short of memory be the reason?

brgs Andreas

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-02-14 19:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-20  2:03 [ECOS] Breakpoint problem Andreas.Karlsson
  -- strict thread matches above, loose matches on Subject: below --
2002-02-12  0:58 N.Suresh
2002-02-14 11:18 ` Jonathan Larmour
2000-10-19  6:35 Andreas.Karlsson
2000-10-19  4:55 Andreas.Karlsson
2000-10-19  5:50 ` Jesper Skov
2000-10-19  6:11   ` Jonathan Larmour

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).