[ECOS] Problem when debugging via gdb over ethernet

Gary Thomas gary@mlbassoc.com
Thu Jun 5 11:14:00 GMT 2008


Guenter Ebermann wrote:
> Hello,
> 
> I would propose the following change in eth_drv.c.
> 
> Had the problem when debugging with gdb over ethernet and a diag_printf (which
> would then be redirected to the gdb-stub sitting in RedBoot ROMRAM) is used
> during the ethernet driver is stopped my system crashed (using FEC driver on
> MPC5200).
> 
> I found a config option which already exists and is used in the same way in other
> files where the ethernet driver is stopped/reconfigured temporary.
> I think it should be also used in this case.
> 
> The suspeced code is called from my RAM application indirectly from init_net() in
> bootp_support.c.
> 
> Sorry my patch is against our local CVS repository. Our company restriced cvs access
> to the outside. Anyway, I checked the place the code is on dev-head over WebCVS
  ... snip
> 
> What do you think?

I agree that this is a potential problem (just FYI, the notion of
having debug I/O happen over the ethernet while the same interface
was being configured was not present when I designed/wrote this
code originally.  It's a happy result, but there are many caveats
to consider...)

I think that this protection belongs in the eth_drv_start() and
eth_drv_stop() functions, as they can be called from other places
and the problem you are seeing could potentially exist there
as well.

Can you try the attached patch to see if it works for you?

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20080605/ff1e3d90/attachment.ksh>
-------------- next part --------------
-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


More information about the Ecos-discuss mailing list