This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: gdb and ioctl(sd, SIOCIFCREATE, &ifreq)
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Morris Walton <mwalton at telesyn dot com>
- Cc: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Tue, 02 Nov 2004 04:57:03 -0700
- Subject: Re: [ECOS] gdb and ioctl(sd, SIOCIFCREATE, &ifreq)
- Organization: MLB Associates
- References: <000b01c4c07c$c4c7c280$760810ac@telesyn.corp>
On Mon, 2004-11-01 at 18:39, Morris Walton wrote:
> Hi,
>
> My gdb session to my ppc 8xxx target (using Ethernet - target remote
> <ip>:9000) appears to be hung after the code running on the target issues
> the SIOCIFCREATE io command:
>
> int
> if_dev_create(char *name)
> {
> struct ifreq ifreq;
>
> int sd = socket(AF_INET, SOCK_DGRAM, 0);
>
> strcpy(ifreq.ifr_name, name);
> if (ioctl(sd, SIOCIFCREATE, &ifreq) == -1)
>
> <no longer stepping, gdb unresponsive>
>
> Anyone had luck or have suggestions with using the SIOCIFCREATE? This looks
> like it amounts to a call to if_clone_create.
Does your RedBoot have a separate IP address from the eCos application?
If not, e.g. RedBoot's IP address is DHCP assigned, then once the eCos
application starts up, things will get confused and the debug session
will break.
Simply make sure that the GDB world (RedBoot) and eCos application
have different IP addresses. I do this by using static unique IP
addresses for RedBoot.
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss