This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos 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: gdb and ioctl(sd, SIOCIFCREATE, &ifreq)


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


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