From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Kettenis To: rth@cygnus.com Cc: bernds@masala.cygnus.co.uk, gcc-patches@gcc.gnu.org, gdb@sourceware.cygnus.com Subject: Re: More SSE infrastructure Date: Wed, 05 Jul 2000 06:45:00 -0000 Message-id: <200007051344.e65DigH01032@delius.kettenis.local> References: <20000703122133.F25642@cygnus.com> <20000703140220.A25809@cygnus.com> <200007040019.e640Jwe00432@delius.kettenis.local> <20000705001646.B27048@cygnus.com> X-SW-Source: 2000-07/msg00011.html Date: Wed, 5 Jul 2000 00:16:46 -0700 From: Richard Henderson On Tue, Jul 04, 2000 at 02:19:58AM +0200, Mark Kettenis wrote: > It would make some sense though to make the __m128 type similar to the > SSE registers. I don't agree. If you wanted v4sf, you can use v4sf in the source. Though not, admittedly, with Intel's interface. But you can get it from GCC easily enough. Whatever, I don't really care. In any case, the question at hand has absolutely nothing to do with SSE specifically, but rather what we should give GDB for describing a 128-bit integer. [snip] So, the object being, fix the debugging code to cope with integer objects larger than twice the host word size. And in order to do that, we need to know what GDB needs to do its job. I'm assuming you're talking about stabs here. In the original message I sent, perhaps only to the GCC list (oops), I quoted a fragment from the stabs emitter, wherein we look to see if it's easy to print the upper bound for the type. If it isn't easy, we just print -1. If the lower bound is 0 and the upper bound is -1, GDB interprets the type as an unsigned integer with the size of the hosts natural integer type (i.e. 4 bytes on a 32-bit machine). So the question is, do we really have to print the correct upper and lower bounds for the 128-bit type, or can we just use 0 and -1, as the existing code would suggest. GDB uses the range info to determine the size of an object, even for global symbols where it might be able to get the size from the symbol table. So using 0 and -1 wouldn't produce anything useful. Giving the correct upper and lower bounds does work (tested on Solaris 2.6, with a recent GDB snapshot and egcs-2.91.66, where I added the stab for a 128-bit type by hand). GDB happily prints a 128-bit hexadecimal constant when I ask it to print the value of a 128-bit variable, but refuses to evaluate any complex expressions using this variable, telling me that it cannot do such things on integer variables larger than 8 bytes. If printing correct lower and upper bounds is too hard for GCC, there are alternatives. If the lower bound is 0 and the upper bound is a negative number, GDB assumes the size of the type (in bytes) is the absolute value of the upper bound. I've verified that emitting: .stabs "__m128:t(0,20)=r(0,20);0;-16;",128,0,0,0 does indeed work. The GNU stabs info file suggests that this is a Convex convention. It seems that GDB also supports type attributes (an AIX extension, see the GNU stabs info file). So .stabs "__m128:t(0,20)=@s128;r(0,20);0;-1;",128,0,0,0 also works. The relevant bits of code in GDB are stabsread.c:read_range_type() (which interprets the lower and upper bound) and stabsread.c:read_type() (which is sopposed to interpret the entire stabs type string, and interprets the `s' type attribute). Mark >From pbreed@yahoo.com Wed Jul 05 07:12:00 2000 From: Paul Breed To: insight@sourceware.cygnus.com, gdb@sourceware.cygnus.com Subject: Step into and Step over.... Date: Wed, 05 Jul 2000 07:12:00 -0000 Message-id: <20000705141145.11822.qmail@web3507.mail.yahoo.com> X-SW-Source: 2000-07/msg00012.html Content-length: 1186 I've been stuck at this place for a long time. I'm willing to pay someone to help me solve this.... Step over does not work. Example: 10)printf("Something"); 11)myfunction(); 12)printf("Something else"); If I am stopped at a break point on line 10 If I hit 'S' step I go to the first line of code within printf. If I hit 'N' next I go the the opening brace in the printf function. If I hit 'F' I finish the function and return. I would have expected 'N' to step over the printf on line 10 and stop at line 11. Is this assumption wrong? I'm using the latest Insite build on windows NT as a cross debugger for a M68K-Elf using the remote serial protocol. The code was compiled with GCC 2.95.2 I see the same problem running just GDB (I've not tried 5.0 only 4.18.1) This problem has persisted unchanged for more than a year I'd be glad to work on it myself, but I need some guidance. Help!!!!! Please respond to Paul@Netburner.com as the ISP I normally use is on the Cygnus mail list reject list. So I am reduced to yahoo mail ;-( Paul __________________________________________________ Do You Yahoo!? Kick off your party with Yahoo! Invites. http://invites.yahoo.com/ >From rth@cygnus.com Wed Jul 05 10:56:00 2000 From: Richard Henderson To: Mark Kettenis Cc: bernds@masala.cygnus.co.uk, gcc-patches@gcc.gnu.org, gdb@sourceware.cygnus.com Subject: Re: More SSE infrastructure Date: Wed, 05 Jul 2000 10:56:00 -0000 Message-id: <20000705105600.A27820@cygnus.com> References: <20000703122133.F25642@cygnus.com> <20000703140220.A25809@cygnus.com> <200007040019.e640Jwe00432@delius.kettenis.local> <20000705001646.B27048@cygnus.com> <200007051344.e65DigH01032@delius.kettenis.local> X-SW-Source: 2000-07/msg00013.html Content-length: 1418 On Wed, Jul 05, 2000 at 03:44:42PM +0200, Mark Kettenis wrote: > GDB uses the range info to determine the size of an object, even for > global symbols where it might be able to get the size from the symbol > table. So using 0 and -1 wouldn't produce anything useful. Ok. I figured it couldn't be that easy. > Giving the correct upper and lower bounds does work (tested on Solaris > 2.6, with a recent GDB snapshot and egcs-2.91.66, where I added the > stab for a 128-bit type by hand). Next question: will GDB accept negative octal constants for signed 128-bit types? E.g. -017777. I surely don't want to do decimal output without libgmp on my side, which we don't want to assume. It wouldn't be the end of the world if we wound up considering all such types unsigned in the debugger, but if it's possible... > If printing correct lower and upper bounds is too hard for GCC, there > are alternatives. If the lower bound is 0 and the upper bound is a > negative number, GDB assumes the size of the type (in bytes) is the > absolute value of the upper bound. I've verified that emitting: > > .stabs "__m128:t(0,20)=r(0,20);0;-16;",128,0,0,0 > > does indeed work. The GNU stabs info file suggests that this is a > Convex convention. Interesting to know. However, I would imagine that not all stabs system debuggers allow such a thing, so it'd be better to go with printing proper bounds if possible. r~ >From kettenis@wins.uva.nl Wed Jul 05 12:08:00 2000 From: Mark Kettenis To: rth@cygnus.com Cc: bernds@masala.cygnus.co.uk, gcc-patches@gcc.gnu.org, gdb@sourceware.cygnus.com Subject: Re: More SSE infrastructure Date: Wed, 05 Jul 2000 12:08:00 -0000 Message-id: <200007051908.e65J89c01140@delius.kettenis.local> References: <20000703122133.F25642@cygnus.com> <20000703140220.A25809@cygnus.com> <200007040019.e640Jwe00432@delius.kettenis.local> <20000705001646.B27048@cygnus.com> <200007051344.e65DigH01032@delius.kettenis.local> <20000705105600.A27820@cygnus.com> X-SW-Source: 2000-07/msg00014.html Content-length: 1530 Date: Wed, 5 Jul 2000 10:56:00 -0700 From: Richard Henderson Next question: will GDB accept negative octal constants for signed 128-bit types? E.g. -017777. I surely don't want to do decimal output without libgmp on my side, which we don't want to assume. Not with the explicit minus sign. You specify the sign bit as part of the octal number, e.g. 020000 for your example (the range would be specified as 020000;017777; in this case). This is exactly what is already done for `long' and `long long'. It wouldn't be the end of the world if we wound up considering all such types unsigned in the debugger, but if it's possible... Looks like GDB treats those extremely large integers as unsigned anyway :-(. I might take a look on a rainy day or so ... > If printing correct lower and upper bounds is too hard for GCC, there > are alternatives. If the lower bound is 0 and the upper bound is a > negative number, GDB assumes the size of the type (in bytes) is the > absolute value of the upper bound. I've verified that emitting: > > .stabs "__m128:t(0,20)=r(0,20);0;-16;",128,0,0,0 > > does indeed work. The GNU stabs info file suggests that this is a > Convex convention. Interesting to know. However, I would imagine that not all stabs system debuggers allow such a thing, so it'd be better to go with printing proper bounds if possible. I'd be really surprised if those stabs system debugger would allow large integers at all. Mark >From avr_fan@nettaxi.com Wed Jul 05 17:12:00 2000 From: "Dave Arnold" To: "Paul Breed" , , Subject: Re: Step into and Step over.... Date: Wed, 05 Jul 2000 17:12:00 -0000 Message-id: <010801bfe6e0$20293ee0$64251004@homepc.freedsl.com> X-SW-Source: 2000-07/msg00015.html Content-length: 2869 hi, I've had similar problems but I'm unsure whether the current available port of Insight to cygwin even works for anyone using win9x. I've posted questions to the list to see who else is using it, if they're having problems or not but I have not one response out of about 3 postings. I personally have had numerous problems. I love the GUI on insight, it seems to have a load of great features and is very intuitive GUI which gets me excited. But I have not been able to use it. Sometimes what I'll do is recompile with DJGPP and use the command line gdb that comes with DJGPP instead, or I'll go as far as using Borland debugger but this is getting tiresome after so many times. I've been planning on trying to do a build of the latest source on my win95 computer to see if things will go any smoother but haven't got around to it. Do you know if Insight GDB will compile "OOB' with a ./configure and make ? under cygwin on win95? The problems I've had are numerous, most common are these: 1.source code in assembly only 2.listing source limited to some files and not others e.g. list foo.c:myfunc() gives an error saying "source unavailable" 3.stepping and breakpoints work on and off and unpredictably. 4.using gdb console window and attempting to run an .exe gives "Error 193" and failed to create process. What the heck am I supposed to do? /dave -----Original Message----- From: Paul Breed To: insight@sourceware.cygnus.com ; gdb@sourceware.cygnus.com Date: Wednesday, July 05, 2000 7:13 AM Subject: Step into and Step over.... >I've been stuck at this place for a long time. >I'm willing to pay someone to help me solve this.... > >Step over does not work. >Example: >10)printf("Something"); >11)myfunction(); >12)printf("Something else"); > >If I am stopped at a break point on line 10 > >If I hit 'S' step I go to the first line of code >within printf. > >If I hit 'N' next I go the the opening brace in the >printf function. > >If I hit 'F' I finish the function and return. > >I would have expected 'N' to step over the printf on >line 10 and stop at line 11. >Is this assumption wrong? > > >I'm using the latest Insite build on windows NT as >a cross debugger for a M68K-Elf using the remote >serial >protocol. > >The code was compiled with GCC 2.95.2 > >I see the same problem running just GDB (I've not >tried 5.0 only 4.18.1) > >This problem has persisted unchanged for more than a >year I'd be glad to work on it myself, but I need some >guidance. > >Help!!!!! > >Please respond to Paul@Netburner.com as the ISP I >normally use is on the Cygnus mail list reject list. >So I am reduced to yahoo mail ;-( > >Paul > > > > > >__________________________________________________ >Do You Yahoo!? >Kick off your party with Yahoo! Invites. > http://invites.yahoo.com/