public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* lm32 run vs gdb
@ 2016-03-11 21:13 Joel Sherrill
  2016-03-11 21:55 ` Mike Frysinger
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Sherrill @ 2016-03-11 21:13 UTC (permalink / raw)
  To: gdb, Chris Johns

Hi

I think the command line arguments for the lm32 simulator
are not getting parsed the same for "run" as when you do
"tar sim" in gdb.  Executables work with gdb that don't
with run.

lm32-rtems4.12-run --hw-file lm32_evr.conf  \
   --memory-region 0x08000000,0x4000000 ticker.exe

In gdb, the tar sim command is:

tar sim --hw-file lm32_evr.conf --memory-region 0x08000000,0x4000000

lm32_evr.conf is

/lm32cpu
/lm32uart/reg 0x80006000 0x100
/lm32uart > int int0 /lm32cpu
/lm32timer/reg 0x80002000 0x80
/lm32timer > int int1 /lm32cpu

Any ideas what's broken or where I should look?

I can compress an executable if someone wants to take a shot
at it.  

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill@OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35806
Support Available                (256) 722-9985

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

* Re: lm32 run vs gdb
  2016-03-11 21:13 lm32 run vs gdb Joel Sherrill
@ 2016-03-11 21:55 ` Mike Frysinger
  2016-03-14  0:32   ` Chris Johns
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2016-03-11 21:55 UTC (permalink / raw)
  To: Joel Sherrill; +Cc: gdb, Chris Johns

[-- Attachment #1: Type: text/plain, Size: 891 bytes --]

On 11 Mar 2016 15:12, Joel Sherrill wrote:
> I think the command line arguments for the lm32 simulator
> are not getting parsed the same for "run" as when you do
> "tar sim" in gdb.  Executables work with gdb that don't
> with run.

wtf is "tar" ?  hmm, guess it's short for "target sim" ...

> lm32-rtems4.12-run --hw-file lm32_evr.conf  \
>    --memory-region 0x08000000,0x4000000 ticker.exe
> 
> In gdb, the tar sim command is:
> 
> tar sim --hw-file lm32_evr.conf --memory-region 0x08000000,0x4000000
> 
> lm32_evr.conf is
> 
> /lm32cpu
> /lm32uart/reg 0x80006000 0x100
> /lm32uart > int int0 /lm32cpu
> /lm32timer/reg 0x80002000 0x80
> /lm32timer > int int1 /lm32cpu
> 
> Any ideas what's broken or where I should look?

the arg parsing codepaths are the same -- see sim/lm32/sim-if.c and
the sim_open function.  gdb & the run frontend both call that.
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: lm32 run vs gdb
  2016-03-11 21:55 ` Mike Frysinger
@ 2016-03-14  0:32   ` Chris Johns
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Johns @ 2016-03-14  0:32 UTC (permalink / raw)
  To: Joel Sherrill, gdb

On 12/03/2016 08:55, Mike Frysinger wrote:
> On 11 Mar 2016 15:12, Joel Sherrill wrote:
>> I think the command line arguments for the lm32 simulator
>> are not getting parsed the same for "run" as when you do
>> "tar sim" in gdb.  Executables work with gdb that don't
>> with run.
>
> wtf is "tar" ?  hmm, guess it's short for "target sim" ...
>
>> lm32-rtems4.12-run --hw-file lm32_evr.conf  \
>>     --memory-region 0x08000000,0x4000000 ticker.exe
>>
>> In gdb, the tar sim command is:
>>
>> tar sim --hw-file lm32_evr.conf --memory-region 0x08000000,0x4000000
>>
>> lm32_evr.conf is
>>
>> /lm32cpu
>> /lm32uart/reg 0x80006000 0x100
>> /lm32uart > int int0 /lm32cpu
>> /lm32timer/reg 0x80002000 0x80
>> /lm32timer > int int1 /lm32cpu
>>
>> Any ideas what's broken or where I should look?
>
> the arg parsing codepaths are the same -- see sim/lm32/sim-if.c and
> the sim_open function.  gdb & the run frontend both call that.

It looks like something has changed. With gdb-7.11 and the 
sparc-rtems4.11 target I am seeing:

$ /opt/work/rtems/4.12/bin/sparc-rtems4.12-run 
./sparc-rtems4.12/c/erc32/testsuites/samples/ticker/ticker.exe

  SIS - SPARC instruction simulator 2.7.5,  copyright Jiri Gaisler 1995
  Bug-reports to jgais@wd.estec.esa.nl

sis> quit

With gdb-7.9 it use to just run the executable. GDB works.

Chris

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

end of thread, other threads:[~2016-03-14  0:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-11 21:13 lm32 run vs gdb Joel Sherrill
2016-03-11 21:55 ` Mike Frysinger
2016-03-14  0:32   ` Chris Johns

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