public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug sim/9734] result of sim_create_inferior not checked in remote-sim.c
       [not found] <bug-9734-4717@http.sourceware.org/bugzilla/>
@ 2012-02-16  4:44 ` vapier at gentoo dot org
  2012-02-16  4:57 ` vapier at gentoo dot org
  2012-02-16 18:33 ` vapier at gentoo dot org
  2 siblings, 0 replies; 6+ messages in thread
From: vapier at gentoo dot org @ 2012-02-16  4:44 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=9734

Mike Frysinger <vapier at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vapier at gentoo dot org

--- Comment #3 from Mike Frysinger <vapier at gentoo dot org> 2012-02-16 04:42:16 UTC ---
i tested over here and indeed, the code path suggested in the summary results
in gdb attempting to dump core.  i'll post a patch to use error().

$ ./gdb/gdb /tftpboot/u-boot
(gdb) target sim
Connected to the simulator.
(gdb) load
Loading section .text.pre, size 0xf0 lma 0x3f00000
Loading section .text.init, size 0x170 lma 0x3f000f0
Loading section .text, size 0x2af90 lma 0x3f00260
Loading section .rodata, size 0x12d04 lma 0x3f2b1f0
Loading section .data, size 0xa524 lma 0x3f3def4
Loading section .u_boot_cmd, size 0x8a4 lma 0x3f48418
Loading section .text_l1, size 0x28 lma 0x3f48cbc
Start address 0x3f00000
Transfer rate: 2385696 bits in <1 sec.
(gdb) run
Starting program: /tftpboot/u-boot 
thread.c:72: internal-error: inferior_thread: Assertion `tp' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y
thread.c:72: internal-error: inferior_thread: Assertion `tp' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) y
Aborted (core dumped)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug sim/9734] result of sim_create_inferior not checked in remote-sim.c
       [not found] <bug-9734-4717@http.sourceware.org/bugzilla/>
  2012-02-16  4:44 ` [Bug sim/9734] result of sim_create_inferior not checked in remote-sim.c vapier at gentoo dot org
@ 2012-02-16  4:57 ` vapier at gentoo dot org
  2012-02-16 18:33 ` vapier at gentoo dot org
  2 siblings, 0 replies; 6+ messages in thread
From: vapier at gentoo dot org @ 2012-02-16  4:57 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=9734

--- Comment #4 from Mike Frysinger <vapier at gentoo dot org> 2012-02-16 04:54:55 UTC ---
patch posted here:
 http://sourceware.org/ml/gdb-patches/2012-02/msg00317.html

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug sim/9734] result of sim_create_inferior not checked in remote-sim.c
       [not found] <bug-9734-4717@http.sourceware.org/bugzilla/>
  2012-02-16  4:44 ` [Bug sim/9734] result of sim_create_inferior not checked in remote-sim.c vapier at gentoo dot org
  2012-02-16  4:57 ` vapier at gentoo dot org
@ 2012-02-16 18:33 ` vapier at gentoo dot org
  2 siblings, 0 replies; 6+ messages in thread
From: vapier at gentoo dot org @ 2012-02-16 18:33 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=9734

Mike Frysinger <vapier at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #5 from Mike Frysinger <vapier at gentoo dot org> 2012-02-16 18:30:46 UTC ---
committed aforementioned patch

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug sim/9734] result of sim_create_inferior not checked in remote-sim.c
  2009-01-12 14:27 [Bug sim/9734] New: result of sim_create_sim " richard dot stuckey at arc dot com
  2009-01-12 14:27 ` [Bug sim/9734] result of sim_create_inferior " richard dot stuckey at arc dot com
  2009-01-12 14:33 ` pedro at codesourcery dot com
@ 2009-01-12 14:48 ` richard dot stuckey at arc dot com
  2 siblings, 0 replies; 6+ messages in thread
From: richard dot stuckey at arc dot com @ 2009-01-12 14:48 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From richard dot stuckey at arc dot com  2009-01-12 14:48 -------
I have added a check to the ARC-specific version of sim_create_inferior that the
endianness of the executable file matches the endiannness of the simulator
target, for the situation that the target instance is created before the
executable file has been specified (this check should also probably go into the
gdb core code, in remote-sim.c, but I try to avoid altering the core code where
possible); if the check fails, the function gives a warning and returns 
SIM_RC_FAIL.

This, together with the change I suggested to gdbsim_create_inferior, gives the
behaviour:

(gdb) set endian big
The target is assumed to be big endian
(gdb) target sim
Connected to the simulator.
(gdb) file test.little
Reading symbols from test.little...done.
(gdb) load
(gdb) run
Starting program: test.little 
Target is big-endian but executable file test.little is little-endian.
The program is not being run.

gdb appears to be left in a stable state at this point, but I have not carried
out extensive testing on this, so am willing to accept that throwing an error
may be better.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=9734

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug sim/9734] result of sim_create_inferior not checked in remote-sim.c
  2009-01-12 14:27 [Bug sim/9734] New: result of sim_create_sim " richard dot stuckey at arc dot com
  2009-01-12 14:27 ` [Bug sim/9734] result of sim_create_inferior " richard dot stuckey at arc dot com
@ 2009-01-12 14:33 ` pedro at codesourcery dot com
  2009-01-12 14:48 ` richard dot stuckey at arc dot com
  2 siblings, 0 replies; 6+ messages in thread
From: pedro at codesourcery dot com @ 2009-01-12 14:33 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From pedro at codesourcery dot com  2009-01-12 14:33 -------
I see that the result of sim_create_inferior is still not checked on current
mainline.  I think that it would be best to throw an error() instead, otherwise
currently core gdb will probably assert, in thinking the inferior was created.

if (sim_create_inferior (gdbsim_desc, exec_bfd, argv, env) != SIM_RC_OK)
  error (_("foo failed to create, blah!"));


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1


http://sourceware.org/bugzilla/show_bug.cgi?id=9734

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug sim/9734] result of sim_create_inferior not checked in remote-sim.c
  2009-01-12 14:27 [Bug sim/9734] New: result of sim_create_sim " richard dot stuckey at arc dot com
@ 2009-01-12 14:27 ` richard dot stuckey at arc dot com
  2009-01-12 14:33 ` pedro at codesourcery dot com
  2009-01-12 14:48 ` richard dot stuckey at arc dot com
  2 siblings, 0 replies; 6+ messages in thread
From: richard dot stuckey at arc dot com @ 2009-01-12 14:27 UTC (permalink / raw)
  To: gdb-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|result of sim_create_sim not|result of
                   |checked in remote-sim.c     |sim_create_inferior not
                   |                            |checked in remote-sim.c


http://sourceware.org/bugzilla/show_bug.cgi?id=9734

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

end of thread, other threads:[~2012-02-16 18:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-9734-4717@http.sourceware.org/bugzilla/>
2012-02-16  4:44 ` [Bug sim/9734] result of sim_create_inferior not checked in remote-sim.c vapier at gentoo dot org
2012-02-16  4:57 ` vapier at gentoo dot org
2012-02-16 18:33 ` vapier at gentoo dot org
2009-01-12 14:27 [Bug sim/9734] New: result of sim_create_sim " richard dot stuckey at arc dot com
2009-01-12 14:27 ` [Bug sim/9734] result of sim_create_inferior " richard dot stuckey at arc dot com
2009-01-12 14:33 ` pedro at codesourcery dot com
2009-01-12 14:48 ` richard dot stuckey at arc dot com

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