[#6636] gdb a2-run.exp test should reload programs in between runs for sim targets (passing args to sim from gdb works only on first run)

Document created by Aaronwu Employee on Oct 17, 2013
Version 1Show Document
  • View in full screen mode

[#6636] gdb a2-run.exp test should reload programs in between runs for sim targets (passing args to sim from gdb works only on first run)

Submitted By: Mike Frysinger

Open Date

2011-06-10 13:56:04    

Priority:

Medium     Assignee:

Glen Anderson

Board:

N/A     Silicon Revision:

Resolution:

Assigned (Not Started)     Fixed In Release:

N/A

Processor:

ALL     

Host Operating System:

toolchain rev.:

    kernel rev.:

State:

Open     Found In Release:

N/A

Is this bug repeatable?:

N/A     

Summary: gdb a2-run.exp test should reload programs in between runs for sim targets (passing args to sim from gdb works only on first run)

Details:

 

seems that there is an issue with using "run" via gdb multiple times where the args arent passed properly

 

$ cat test.c

#include <stdio.h>

int main(int argc, char *argv[]){printf("%i %s\n", argc, argv[1]);}

 

$ bfin-elf-gcc -msim test.c -o test

$ bfin-elf-gdb ./test

(gdb) target sim

(gdb) load

(gdb) run

Starting program: /usr/local/src/blackfin/svn/toolchain/trunk/binutils-2.17/build/a.out

1 (null)

 

Program exited with code 011.

(gdb) run

Starting program: /usr/local/src/blackfin/svn/toolchain/trunk/binutils-2.17/build/a.out

 

Program exited with code 037777777777.

 

this seems to cause gdb testing to fail:

bfin-elf-sim: gdb.base/a2-run.exp: run after setting args to nil

bfin-elf-sim: gdb.base/a2-run.exp: run "run" again after setting args

bfin-elf-sim: gdb.base/a2-run.exp: run "run" again with same args

bfin-elf-sim: gdb.base/a2-run.exp: run "run" with arg

 

Follow-ups

 

--- Mike Frysinger                                           2011-06-10 15:54:49

i think it might have to do with the memory not being reloaded/cleared between

"run" steps.  i think this is currently expected behavior even if it

is not ideal.  will probably have to talk to mainline about it.

 

--- Mike Frysinger                                           2011-06-22 12:39:34

upstream says this is expected behavior.  the a2-run.exp test should be updated

to execute "load" in between runs for sim targets.  which means it's a

gdb test problem, not a sim, so i'll bounce it to someone else.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes