Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Dhananjay R. Deshpande" <dhananjayd@KPITCummins.com>
To: "Michael Snyder" <msnyder@redhat.com>
Cc: "Andrew Cagney" <cagney@gnu.org>,
	"Andrew Cagney" <ac131313@redhat.com>,
	<gdb-patches@sources.redhat.com>
Subject: RE: H8300 Patch - Fix GDB crash problem when object file of different H8 cpu is loaded
Date: Wed, 17 Dec 2003 05:59:00 -0000	[thread overview]
Message-ID: <69595093233BB547BB70CF5E492B63F2034027F3@sohm.kpit.com> (raw)


Hi Michael,

> 
> I'm afraid you need to un-commit it.  This breaks gdb.
> It no longer works with the simulator for h8s, h8h, or h8sx.

I did make sure that GDB is working with simulator for H8/300, H8/300H and H8S.
I am appending the gdb log where output file of each target is loaded in GDB with simulator as target.

> 
> As I mentioned earlier in this thread, these global variables
> that you've replaced are shared between gdb and the sim.  The
> sim depends on them.  You've split them into essentially
> gdb's copy and the sim's copy, but now the sim's copy is
> never getting initialized, becuase it was gdb that
> initialized the shared ones.  That's why they were shared.
> 

The SIM sets these variables in set_h8300h called from sim_load. The GDB calls sim_load.
 
If you still think that patch should be reverted, I will do that.

[dhananjayd@Linuxsrv5 gnu]$ ~/gdbh8/bin/h8300-elf-gdb
GNU gdb 2003-12-17-cvs
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=h8300-elf".
(gdb) file h8.out
Reading symbols from h8.out...done.
(gdb) target sim
Connected to the simulator.
(gdb) lo
Loading section .init, size 0xa vma 0x100
Loading section .text, size 0xab82 vma 0x10c
Loading section .fini, size 0x6 vma 0xac8e
Loading section .rodata, size 0x30c vma 0xac94
Loading section .data, size 0x41a vma 0xafa0
Loading section .ctors, size 0x4 vma 0xb3ba
Loading section .dtors, size 0x4 vma 0xb3be
Loading section .jcr, size 0x2 vma 0xb3c2
Start address 0x10c
Transfer rate: 366096 bits in <1 sec.
(gdb) r
Starting program: /user/dhananjayd/gnu/h8.out
Hello 1,2,3

Program exited normally.
(gdb) show architecture
The target architecture is set automatically (currently h8300)
(gdb) file h8h.out
A program is being debugged already.  Kill it? (y or n) y

Load new symbol table from "h8h.out"? (y or n) y
Reading symbols from h8h.out...done.
(gdb) target sim
Connected to the simulator.
(gdb) lo
Loading section .init, size 0xa vma 0x100
Loading section .text, size 0x9052 vma 0x10c
Loading section .fini, size 0x6 vma 0x915e
Loading section .rodata, size 0x3e0 vma 0x9164
Loading section .data, size 0x754 vma 0x9544
Loading section .ctors, size 0x8 vma 0x9c98
Loading section .dtors, size 0x8 vma 0x9ca0
Loading section .jcr, size 0x4 vma 0x9ca8
Start address 0x10c
Transfer rate: 318800 bits in <1 sec.
(gdb) r
Starting program: /user/dhananjayd/gnu/h8h.out
Hello 1,2,3

Program exited normally.
(gdb) show architecture
The target architecture is set automatically (currently h8300h)
(gdb) file h8s.out
A program is being debugged already.  Kill it? (y or n) y

Load new symbol table from "h8s.out"? (y or n) y
Reading symbols from h8s.out...done.
(gdb) target sim
Connected to the simulator.
(gdb) lo
Loading section .init, size 0xa vma 0x100
Loading section .text, size 0x8df0 vma 0x10c
Loading section .fini, size 0x6 vma 0x8efc
Loading section .rodata, size 0x3e0 vma 0x8f04
Loading section .data, size 0x754 vma 0x92e4
Loading section .ctors, size 0x8 vma 0x9a38
Loading section .dtors, size 0x8 vma 0x9a40
Loading section .jcr, size 0x4 vma 0x9a48
Start address 0x10c
Transfer rate: 313920 bits in <1 sec.
(gdb) r
Starting program: /user/dhananjayd/gnu/h8s.out
Hello 1,2,3

Program exited normally.
(gdb) show architecture
The target architecture is set automatically (currently h8300s)
(gdb)


Regards,
Dhananjay

> -----Original Message-----
> From: Michael Snyder [mailto:msnyder@redhat.com]
> Sent: Wednesday, December 17, 2003 5:27 AM
> To: Dhananjay R. Deshpande
> Cc: Andrew Cagney; Andrew Cagney; gdb-patches@sources.redhat.com
> Subject: Re: H8300 Patch - Fix GDB crash problem when object file of
> different H8 cpu is loaded
> 
> 
> Dhananjay R. Deshpande wrote:
> > Thanks.
> > 
> > Commited.
> 
> I'm afraid you need to un-commit it.  This breaks gdb.
> It no longer works with the simulator for h8s, h8h, or h8sx.
> 
> As I mentioned earlier in this thread, these global variables
> that you've replaced are shared between gdb and the sim.  The
> sim depends on them.  You've split them into essentially
> gdb's copy and the sim's copy, but now the sim's copy is
> never getting initialized, becuase it was gdb that
> initialized the shared ones.  That's why they were shared.
> 
> To complete this job, you need to work out an interface
> that will allow the sim to get this information from gdb.
> 
> > 
> > -Dhannajay
> > 
> > 
> >>-----Original Message-----
> >>From: Andrew Cagney [mailto:cagney@gnu.org]
> >>Sent: Wednesday, December 10, 2003 10:41 PM
> >>To: Dhananjay R. Deshpande; Michael Snyder
> >>Cc: Andrew Cagney; gdb-patches@sources.redhat.com
> >>Subject: Re: H8300 Patch - Fix GDB crash problem when object file of
> >>different H8 cpu is loaded
> >>
> >>
> >>
> >>>Hi,
> >>>
> >>>If you can, please check in the patch. My CVS access 
> >>
> >>problem is not yet solved. I had put a request to update my 
> >>public key to overseers but its not done. 
> >>http://sources.redhat.com/ml/overseers/2003-q4/msg00240.html
> >>
> >>Michael, can you please handle this.
> >>
> >>Andrew
> >>
> >>
> > 
> > 
> > 
> 
> 
> 


             reply	other threads:[~2003-12-17  5:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-17  5:59 Dhananjay R. Deshpande [this message]
2003-12-17 19:32 ` Michael Snyder
2003-12-17 19:54   ` [PATCH] Fix problem with sim_load (h8300) Michael Snyder
  -- strict thread matches above, loose matches on Subject: below --
2003-12-11  6:52 H8300 Patch - Fix GDB crash problem when object file of different H8 cpu is loaded Dhananjay R. Deshpande
2003-12-16 23:56 ` Michael Snyder
2003-12-10  5:06 Dhananjay R. Deshpande
2003-12-10 17:10 ` Andrew Cagney
2003-12-02 13:18 Dhananjay R. Deshpande
2003-12-03  4:24 ` Andrew Cagney
2003-12-01 12:58 Dhananjay R. Deshpande
2003-12-01 17:26 ` Andrew Cagney
2003-11-14  8:58 Dhananjay R. Deshpande
2003-11-14 14:49 ` Andrew Cagney
2003-11-14 20:03   ` Michael Snyder
2003-11-14 20:13     ` Michael Snyder
2003-11-14 21:09       ` Andrew Cagney

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=69595093233BB547BB70CF5E492B63F2034027F3@sohm.kpit.com \
    --to=dhananjayd@kpitcummins.com \
    --cc=ac131313@redhat.com \
    --cc=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=msnyder@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