This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] New GDB Port CR16


On 09/04/2012 07:49 AM, Kaushik Phatak wrote:
> Hi Pedro,
>> Is this dependency on host signal defines what is done on other sims?
> This was probably added when breakpoint support was being added to this
> sim port with reference of the SH port I believe.
> 
>> there is cruft like this in other sims.  it probably would be desirable to clean it up.
> Yes Mike, I agree. I have tested it without this hunk and breakpoints seem to
> work as expected. Please see below the patch that reverts this in sim.
> I am rearranging some code to create cr16-linux-tdep.c file as suggested by Yao
> and will post the gdb related patches soon.
> Thanks!
> 
> 
> 2012-09-03 Kaushik Phatak<kaushik.phatak@kpitcummins.com>
> 
> sim/cr16/ChangeLog:
> 	* interp.c: Clean SIGBUS related macro.
> 
> --- gdb_src.orig/sim/cr16/interp.c      2012-09-04 12:08:34.000000000 +0530
> +++ gdb_src/src/sim/cr16/interp.c       2012-06-18 05:04:17.000000000 +0530
> @@ -1192,11 +1192,7 @@ sim_resume (SIM_DESC sd, int step, int s
>        iaddr = imem_addr ((uint32)PC);
>        if (iaddr == State.mem.fault)
>          {
> -#ifdef SIGBUS
>            State.exception = SIGBUS;
> -#else
> -          State.exception = SIGSEGV;
> -#endif
>            break;
>          }

Looks obvious enough to me.

Though, we should really get away with using host signals for this stuff,
using sim/gdb's own signal numbers instead.  For a rainy day, perhaps...

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]