Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Signal definitions for host=mingw32/target=*-*-*
@ 2006-04-15 16:36 Masaki MURANAKA
  2006-04-15 18:25 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Masaki MURANAKA @ 2006-04-15 16:36 UTC (permalink / raw)
  To: gdb-patches

Hello,

This is a patch that enables to build cross debuggers
on MinGW.
The base version of this patch is gdb-6.4.

I've built m32r-elf-gdb with it and checked to work.

----
2006-04-16  Masaki MURANAKA  <monaka@monami-software.com>

         * sim-signal.c: On MinGW, Added some signal definitions.
		They are not defined in Win32's signal.h.
         * remote-sim.c: Same above.
----

Index: sim/common/sim-signal.c
===================================================================
RCS file: /home/cvs/pizzafactory/gdb/sim/common/sim-signal.c,v
retrieving revision 1.3
diff -r1.3 sim-signal.c
30c30
< #ifdef _MSC_VER
---
 > #if defined(_MSC_VER) || defined(__MINGW32__)
Index: gdb/remote-sim.c
===================================================================
RCS file: /home/cvs/pizzafactory/gdb/gdb/remote-sim.c,v
retrieving revision 1.4
diff -r1.4 remote-sim.c
46a47,58
 > #if defined(_MSC_VER) || defined(__MINGW32__)
 > #ifndef SIGTRAP
 > #define SIGTRAP 5
 > #endif
 > #ifndef SIGBUS
 > #define SIGBUS 10
 > #endif
 > #ifndef SIGQUIT
 > #define SIGQUIT 3
 > #endif
 > #endif
 >


--
Masaki Muranaka
Monami software



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

* Re: Signal definitions for host=mingw32/target=*-*-*
  2006-04-15 16:36 Signal definitions for host=mingw32/target=*-*-* Masaki MURANAKA
@ 2006-04-15 18:25 ` Eli Zaretskii
  2006-04-15 18:42   ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2006-04-15 18:25 UTC (permalink / raw)
  To: Masaki MURANAKA; +Cc: gdb-patches

> From: Masaki MURANAKA <monaka@monami-software.com>
> Date: Sun, 16 Apr 2006 01:36:44 +0900
> 
> This is a patch that enables to build cross debuggers
> on MinGW.
> The base version of this patch is gdb-6.4.
> 
> I've built m32r-elf-gdb with it and checked to work.

Thanks.

> ----
> 2006-04-16  Masaki MURANAKA  <monaka@monami-software.com>
> 
>          * sim-signal.c: On MinGW, Added some signal definitions.
> 		They are not defined in Win32's signal.h.
>          * remote-sim.c: Same above.
> ----
> 
> Index: sim/common/sim-signal.c
> ===================================================================
> RCS file: /home/cvs/pizzafactory/gdb/sim/common/sim-signal.c,v
> retrieving revision 1.3
> diff -r1.3 sim-signal.c
> 30c30
> < #ifdef _MSC_VER
> ---
>  > #if defined(_MSC_VER) || defined(__MINGW32__)
> Index: gdb/remote-sim.c
> ===================================================================
> RCS file: /home/cvs/pizzafactory/gdb/gdb/remote-sim.c,v
> retrieving revision 1.4
> diff -r1.4 remote-sim.c
> 46a47,58
>  > #if defined(_MSC_VER) || defined(__MINGW32__)
>  > #ifndef SIGTRAP
>  > #define SIGTRAP 5
>  > #endif
>  > #ifndef SIGBUS
>  > #define SIGBUS 10
>  > #endif
>  > #ifndef SIGQUIT
>  > #define SIGQUIT 3
>  > #endif
>  > #endif

Sorry, this is not the way to fix such problems.  You cannot add
arbitrary signals to a runtime that doesn't support them.

The right way to fix such problems is to ifdef out the code that uses
these signals.  For example:

 #ifdef SIGTRAP
 ... code that uses SIGTRAP ...
 #endif

(Yes, I know that sim-signal does add these definitions conditioned on
_MSC_VER, but I think that's wrong and should be deleted.)

Btw, I don't see these signals used anywhere in remote-sim.c.  Why did
you need to add them?


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

* Re: Signal definitions for host=mingw32/target=*-*-*
  2006-04-15 18:25 ` Eli Zaretskii
@ 2006-04-15 18:42   ` Daniel Jacobowitz
  2006-04-16  1:17     ` Masaki MURANAKA
  2006-04-16  6:05     ` Eli Zaretskii
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-04-15 18:42 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Masaki MURANAKA, gdb-patches

On Sat, Apr 15, 2006 at 09:25:05PM +0300, Eli Zaretskii wrote:
> > Index: gdb/remote-sim.c
> > ===================================================================
> > RCS file: /home/cvs/pizzafactory/gdb/gdb/remote-sim.c,v
> > retrieving revision 1.4
> > diff -r1.4 remote-sim.c
> > 46a47,58

Masaki MURANAKA wrote that this patch was against GDB 6.4.  Please
try HEAD instead.

> Btw, I don't see these signals used anywhere in remote-sim.c.  Why did
> you need to add them?

They used to be, until:

revision 1.50
date: 2005/11/28 18:32:32;  author: mmitchel;  state: Exp;  lines: +6 -11
        * remote-sim.c (gdbsim_wait): Pass target signal numbers to
        sim_resume.  Expect target signal numbers from sim_stop_reason.

There's still uses of sim_signal_to_host in the simulator, but I don't
quite understand most of them.  I think they're all buggy.  I went
over Mark's patch carefully at the time, but now I see the result of
sim_signal_to_host being compared against signals from sim_stop_reason,
which uses sim_signal_to_target...

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: Signal definitions for host=mingw32/target=*-*-*
  2006-04-15 18:42   ` Daniel Jacobowitz
@ 2006-04-16  1:17     ` Masaki MURANAKA
  2006-04-16  6:05     ` Eli Zaretskii
  1 sibling, 0 replies; 6+ messages in thread
From: Masaki MURANAKA @ 2006-04-16  1:17 UTC (permalink / raw)
  To: gdb-patches

Hello,

On 2006/04/16, at 3:42, Daniel Jacobowitz wrote:
> Masaki MURANAKA wrote that this patch was against GDB 6.4.  Please
> try HEAD instead.

I see. Now I've tried HEAD.
I found some fixes at remote-sim.c.
But, it seems there is no fixes in sim/common/sim-signal.c.

--
Masaki Muranaka
Monami software



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

* Re: Signal definitions for host=mingw32/target=*-*-*
  2006-04-15 18:42   ` Daniel Jacobowitz
  2006-04-16  1:17     ` Masaki MURANAKA
@ 2006-04-16  6:05     ` Eli Zaretskii
  2006-04-16 15:54       ` Daniel Jacobowitz
  1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2006-04-16  6:05 UTC (permalink / raw)
  To: gdb-patches

> Date: Sat, 15 Apr 2006 14:42:47 -0400
> From: Daniel Jacobowitz <drow@false.org>
> Cc: Masaki MURANAKA <monaka@monami-software.com>,
> 	gdb-patches@sourceware.org
> 
> revision 1.50
> date: 2005/11/28 18:32:32;  author: mmitchel;  state: Exp;  lines: +6 -11
>         * remote-sim.c (gdbsim_wait): Pass target signal numbers to
>         sim_resume.  Expect target signal numbers from sim_stop_reason.
> 
> There's still uses of sim_signal_to_host in the simulator, but I don't
> quite understand most of them.  I think they're all buggy.  I went
> over Mark's patch carefully at the time, but now I see the result of
> sim_signal_to_host being compared against signals from sim_stop_reason,
> which uses sim_signal_to_target...

Daniel, I'm not sure what you are saying.  Are you saying that Mark's
patch was wrong in that it introduced bugs that were not there before?


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

* Re: Signal definitions for host=mingw32/target=*-*-*
  2006-04-16  6:05     ` Eli Zaretskii
@ 2006-04-16 15:54       ` Daniel Jacobowitz
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-04-16 15:54 UTC (permalink / raw)
  To: gdb-patches

On Sun, Apr 16, 2006 at 09:05:19AM +0300, Eli Zaretskii wrote:
> > Date: Sat, 15 Apr 2006 14:42:47 -0400
> > From: Daniel Jacobowitz <drow@false.org>
> > Cc: Masaki MURANAKA <monaka@monami-software.com>,
> > 	gdb-patches@sourceware.org
> > 
> > revision 1.50
> > date: 2005/11/28 18:32:32;  author: mmitchel;  state: Exp;  lines: +6 -11
> >         * remote-sim.c (gdbsim_wait): Pass target signal numbers to
> >         sim_resume.  Expect target signal numbers from sim_stop_reason.
> > 
> > There's still uses of sim_signal_to_host in the simulator, but I don't
> > quite understand most of them.  I think they're all buggy.  I went
> > over Mark's patch carefully at the time, but now I see the result of
> > sim_signal_to_host being compared against signals from sim_stop_reason,
> > which uses sim_signal_to_target...
> 
> Daniel, I'm not sure what you are saying.  Are you saying that Mark's
> patch was wrong in that it introduced bugs that were not there before?

Since the host and target signal numberings in these ranges are exactly
the same, no.  It simply failed to fix some bugs which were previously
present when signals are missing.

The remaining calls to sim_signal_to_host should be looked at
carefully; that is the correct fix for this problem.

-- 
Daniel Jacobowitz
CodeSourcery


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

end of thread, other threads:[~2006-04-16 15:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-15 16:36 Signal definitions for host=mingw32/target=*-*-* Masaki MURANAKA
2006-04-15 18:25 ` Eli Zaretskii
2006-04-15 18:42   ` Daniel Jacobowitz
2006-04-16  1:17     ` Masaki MURANAKA
2006-04-16  6:05     ` Eli Zaretskii
2006-04-16 15:54       ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox