public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Jonathan Larmour <jlarmour@redhat.com>
To: Nick Garnett <nickg@cygnus.co.uk>
Cc: ecos-discuss@sourceware.cygnus.com
Subject: Re: [ECOS] [i386 PC platform] Problem with external GDB interrupt
Date: Thu, 31 Aug 2000 10:45:00 -0000	[thread overview]
Message-ID: <39AE99CF.B933CB54@redhat.com> (raw)
In-Reply-To: <poitshel02.fsf@balti.cygnus.co.uk>

Nick Garnett wrote:
> Yes. I suspect that this macro was added after the PC HAL was done,
> and it was not updated.

OOI, I was also (slowly) looking at this after an e-mail last Friday on the
list from Daan Huybrechs on the subject.
 
> It probably needs to look something like this:
> 
> // We have to rewind the PC in case of a breakpoint.
> #define HAL_STUB_PLATFORM_STUBS_FIXUP()                         \
>     CYG_MACRO_START                                             \
>     if (CYGNUM_HAL_VECTOR_BREAKPOINT == __get_trap_number())    \
>         put_register(PC, get_register(PC) - 1);                 \
>     CYG_MACRO_END
> 
> Define it in i386_stub.h, since, despite its name, it is architecture
> rather than platform specific.

His suggested macro was:

extern CYG_ADDRWORD hal_pc_break_pc;
#define HAL_STUB_PLATFORM_STUBS_FIXUP()    \
    if ((int) hal_pc_break_pc == get_register(PC) - 1       \
          put_register(PC, hal_pc_break_pc);                      \
    }

I'm curious as to whether the the x86 increments the PC after *all*
exceptions, or just "int 3"s. i.e. should we be checking for the breakpoint
vector, or should we just correct the PC all the time. Anyone know?

Out of interest, the reason I hadn't finished looking at this is because
Ctrl-C was behaving odd when I looked at it. It got ignored regularly, but
when I debugged it, it *was* receiving a serial interrupt, but the
character it was reading from the port was a '+', not 0x03.

If anyone has any ideas, I'd be grateful coz I ran out of time to look at
it.

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

  reply	other threads:[~2000-08-31 10:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-30 23:56 Fabrice Gautier
2000-08-31  4:30 ` Nick Garnett
2000-08-31 10:45   ` Jonathan Larmour [this message]
2000-08-31 11:00     ` Nick Garnett

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=39AE99CF.B933CB54@redhat.com \
    --to=jlarmour@redhat.com \
    --cc=ecos-discuss@sourceware.cygnus.com \
    --cc=nickg@cygnus.co.uk \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).