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: "Morris Walton" <mwalton at telesyn dot com>
- To: "'Morris Walton'" <mwalton at telesyn dot com>,"'Gary Thomas'" <gary at mlbassoc dot com>
- Cc: "'eCos Discussion'" <ecos-discuss at ecos dot sourceware dot org>
- Date: Tue, 2 Nov 2004 13:02:04 -0500
- Subject: RE: [ECOS] gdb and ioctl(sd, SIOCIFCREATE, &ifreq)
Nm about duplicate ip - found the source and got rid of those messages.
Still have problem with SIOCIFCREATE.
> -----Original Message-----
> From: Morris Walton [mailto:mwalton@telesyn.com]
> Sent: Tuesday, November 02, 2004 11:30 AM
> To: 'Gary Thomas'
> Cc: 'eCos Discussion'
> Subject: RE: [ECOS] gdb and ioctl(sd, SIOCIFCREATE, &ifreq)
>
> You were right: I was using the same IP for both redboot and application.
> Although I still see the original problem, I also see this on the gdb
> console before getting to the ioctl, as the application starts running:
>
> arp: 4019892 is using my IP address :!
> arp: 4019892 is using my IP address :!
>
> I wonder if this is not "confusing" the network now. I hadn't noticed this
> before (when using same IP).
>
> I have checked the lan, and neither address x.101 nor x.100 is used by
> anthing else.
>
> > -----Original Message-----
> > From: Gary Thomas [mailto:gary@mlbassoc.com]
> > Sent: Tuesday, November 02, 2004 6:57 AM
> > To: Morris Walton
> > Cc: eCos Discussion
> > Subject: Re: [ECOS] 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