This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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] |
Oza, have you sent in your copyright assignment? If not, see the file src/gdb/CONTRIBUTE.
I think this patch is OK. How do we continue?
Thanks, Hui
On Sat, Aug 22, 2009 at 00:30, paawan oza<paawan1982@yahoo.com> wrote:Hu Hui, please find the ChageLog and floating point patch attached as you suggested. Sorry for not pasting it in email-body becasue of space and tabs issues. Do we need to update wiki? Regards, Oza.
--- On Wed, 8/19/09, Hui Zhu <teawater@gmail.com> wrote:
From: Hui Zhu <teawater@gmail.com> Subject: Re: final i386.floating.record.patch To: "paawan oza" <paawan1982@yahoo.com> Cc: "Michael Snyder" <msnyder@vmware.com>, "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>, "Mark Kettenis" <mark.kettenis@xs4all.nl> Date: Wednesday, August 19, 2009, 7:47 AM Oops, this is not the bug in fp patch. Sorry for it.
After patch http://sourceware.org/ml/gdb-patches/2009-08/msg00272.html
Everything is OK.
I post a new patch that remove space in the tail. I think you need write a changelog. You can get a example from src/ChangeLog. Please Let each line doesn't bigger than 72.
Thanks, Hui
On Wed, Aug 19, 2009 at 09:13, Hui Zhu<teawater@gmail.com> wrote:Could you try cvs-head?wrote:
On Tue, Aug 18, 2009 at 21:48, paawan oza<paawan1982@yahoo.com>okay.Hi,
Another analysis and observation is:
I used gdb-6.8.50.20090803 and everything seemedthe same and gdb threw these error.Hui used gdb-6.8.50.20090817 and patch was stillmuch or something has gone wrong in error checking.was there any thing major changed in gdb ?
and gdb throws error in ../../src/gdb/utils.c:1200:
which looks like somebody has allocated memory too
the floating-point-patch is still the same, if itworks fine with gdb-6.8.50.20090803, it is high unlikely that why should it throw memory allocation error with gdb-6.8.50.20090817 (unless system is dangerously low in virtual memory, swap space is full).wrote:Regards, Oza.
--- On Mon, 8/17/09, paawan oza <paawan1982@yahoo.com>"Hui Zhu" <teawater@gmail.com>From: paawan oza <paawan1982@yahoo.com> Subject: Re: final i386.floating.record.patch To: "Michael Snyder" <msnyder@vmware.com>,Cc: "gdb-patches@sourceware.org"<gdb-patches@sourceware.org>, "Mark Kettenis" <mark.kettenis@xs4all.nl>Another thing IDate: Monday, August 17, 2009, 9:40 PM Hi Hui,
I test the same and it seems working fine.may be gdb'sobserve is, vertual memory is low problem andother limit!virtual address space gets exhausted or anylinux-p94d:/home/oza/mk_patch/take_diff/gdb_current/gdb-6.8.50.20090803/gdbhighly unlikely though.
please see the atached log.
Inc.# ./gdb ./test_floats GNU gdb (GDB) 6.8.50.20090803 Copyright (C) 2009 Free Software Foundation,<http://gnu.org/licenses/gpl.html>License GPLv3+: GNU GPL version 3 or laterandThis is free software: you are free to changeby law.redistribute it. There is NO WARRANTY, to the extent permitted"i686-pc-linux-gnu".Type "show copying" and "show warranty" for details. This GDB was configured aslibrary load? (yFor bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Setting up the environment for debugging gdb. Function "internal_error" not defined. Make breakpoint pending on future sharedlibrary load? (yor [n]) [answered N; input not from terminal] Function "info_command" not defined. Make breakpoint pending on future shared/home/oza/mk_patch/take_diff/gdb_current/gdb-6.8.50.20090803/gdb/.gdbinit:8:or [n]) [answered N; input not from terminal]
./test_floats.c,Error in sourced command file: No breakpoint number 0. (gdb) start Temporary breakpoint 1 at 0x8048c94: file/home/oza/mk_patch/take_diff/gdb_current/gdb-6.8.50.20090803/gdb/test_floatsline 196. Starting program:
./test_floats.c:196Temporary breakpoint 1, main () atIt will196 init_floats(); (gdb) record (gdb) c Continuing. result is 369.438751 result is 10.320001 result is 23.008301 result is 0.000000 result is 10.450000 result is 10.776012 result is 495830.968750 result is -181.778748 result is 12.525923 result is 2.195619 result is 5.055601 result is inf result is inf result is -0.988032 result is 0.154251 result is -6.405331 result is 1.537475 The next instruction is syscall exit_group.themake the program exit. Do you want to stopTrace/breakpoint trap.program?([y] or n) y Process record: inferior program stopped.
Program received signal SIGTRAP,i386.floating.record.patch0xffffe405 in __kernel_vsyscall () (gdb)
Regards, Oza.
--- On Mon, 8/17/09, Hui Zhu <teawater@gmail.com> wrote:
From: Hui Zhu <teawater@gmail.com> Subject: Re: finalinsns.To: "Michael Snyder" <msnyder@vmware.com> Cc: "paawan oza" <paawan1982@yahoo.com>,"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>, "Mark Kettenis" <mark.kettenis@xs4all.nl>Date: Monday, August 17, 2009, 12:06 PM Get some error with this patch. cat fp.c #include <stdio.h> #include <math.h> #include <stdlib.h>
/* the test intends to test followingfdivrp fmulpflds faddp fstps fstpl fldl fxch fabsfdecstp fld1fsubrpfucomp fnstsw fsqrt fchs f2xm1 fyl2x fxtract fprem1 fldfsincosfldl2tfldl2e FLDPI FLDLG2 FLDLN2 FLDZ fincstp ffree fptan fpatan fincstpfsave frstorfrndintfscale fsin fcos fcmovb fcmovbe fcmove fcmovu fcmovnb fcmovnbe88888888888888888888.88, ldy =fstsw*/
float no1,no2,no3,no4,no5,no6,no7; double x = 100.345, y = 25.7789; long double ldx =4);9999999999999999999.99; float result,resultd,resultld; float *float_memory;
/* initialization of floats */ void init_floats() { no1 = 10.45; no2 = 20.77; no3 = 156.89874646; no4 = 14.56; no5 = 11.11; no6 = 66.77; no7 = 88.88; float_memory = malloc(sizeof(float) *no6 +*float_memory = 256.256; *(float_memory + 1) = 356.356; *(float_memory + 2) = 456.456; *(float_memory + 3) = 556.556; }
/* marks FPU stack as empty */ void empty_fpu_stack() { asm ("ffree %st(1) \n\t" "ffree %st(2) \n\t" "ffree %st(3) \n\t" "ffree %st(4) \n\t" "ffree %st(5) \n\t" "ffree %st(6) \n\t" "ffree %st(7)"); }
/* tests floating point arithmatic */ void test_arith_floats() { result = no1 + no2 + no3 + no4 + no5 +statusno7;printf("result is %f\n",result);
result = fmodf(no2,no1); printf("result is %f\n",result);
resultd = fmod(x,y); printf("result is %f\n",resultd);
resultld = fmodl(ldy,ldy); printf("result is %f\n",resultld);
result = fabsf(no1); printf("result is %f\n",result);
result = no3 / no4; printf("result is %f\n",result);
result = no1 * no2 * no3 * no4; printf("result is %f\n",result);
result = no1 - no2 - no3 - no4; printf("result is %f\n",result);
asm ("fld %0" : :"m"(*float_memory)); asm ("fchs");
/* test for f2xm1 */ asm ("fld %0" : :"m"(*float_memory)); asm ("f2xm1");
asm ("fyl2x");
asm ("fld %0" : :"m"(*float_memory)); asm ("fxtract");
asm ("fld %0" : :"m"(*float_memory)); asm ("fprem1");
/* decrement fpu stack pointer onlystack */register shouldget affected */ asm ("fld %0" : :"m"(*float_memory));
empty_fpu_stack();
asm ("fld1"); asm ("fldl2t"); asm ("fldl2e"); asm ("fldpi"); asm ("fldlg2"); asm ("fldln2"); asm ("fldz");
empty_fpu_stack(); /* finishing emptying the stack */
result = sqrt(no3); printf("result is %f\n",result); }
void test_log_exp_floats() { result = log10(no3); printf("result is %f\n",result);
result = log(no3); printf("result is %f\n",result);
result = exp10(no3); printf("result is %f\n",result);
result = exp(no3); printf("result is %f\n",result); }
void test_trigo_floats() { result = sin(30); printf("result is %f\n",result);
result = cos(30); printf("result is %f\n",result);
result = tan(30); printf("result is %f\n",result);
result = atan(30); printf("result is %f\n",result);
asm ("fld %0" : :"m"(*float_memory)); asm ("fptan");
/* changes st1 and popping register:"m"(*(float_memory+1)));asm ("fpatan");
asm("fincstp"); asm ("fld %0" : :"m"(float_memory)); asm ("fsincos");
asm ("fld %0" : :"m"(*float_memory)); asm ("frndint");
asm ("fld %0" : :"m"(*float_memory)); asm ("fld %0" :andasm ("fscale");
empty_fpu_stack();
asm ("fld %0" : :"m"(*float_memory)); asm ("fsin"); asm ("fcos");
/* currently we assume condition likelyflag is setalways recordthe registers code could be optimized only if the:"m"(*(float_memory+1)));thenrecord */ asm ("fld %0" : :"m"(*float_memory)); asm ("fld %0" :environment */asm ("fcmovb %st(1), %st"); asm ("fcmovbe %st(1), %st"); asm ("fcmove %st(1), %st"); asm ("fcmovu %st(1), %st"); asm ("fcmovnb %st(1), %st"); asm ("fcmovnbe %st(1), %st");
empty_fpu_stack(); /* finished emtyping the stack */ }
void test_compare_floats() { ldy = 88888888888888888888.88; if (ldx == ldy) ldy = 7777777777777777777777777777.777; else ldy = 666666666666666666666666666.666; }
/* test loading and saving of FPU);void test_fpu_env() { asm ("fsave %0" : "=m"(*float_memory) :"m"(*float_memory));asm ("frstor %0" : :Foundation, Inc.asm ("fstsw %ax"); }
int main() { init_floats(); test_arith_floats(); test_log_exp_floats(); test_trigo_floats(); test_compare_floats(); test_fpu_env(); }
./gdb ./a.out GNU gdb (GDB) 6.8.50.20090817-cvs Copyright (C) 2009 Free Softwarelater <http://gnu.org/licenses/gpl.html>License GPLv3+: GNU GPL version 3 orchange andThis is free software: you are free topermitted byredistribute it. There is NO WARRANTY, to the extent"i686-pc-linux-gnu".law.Type "show copying" and "show warranty" for details. This GDB was configured assee:For bug reporting instructions, pleasegdb.<http://www.gnu.org/software/gdb/bugs/>... Setting up the environment for debugginglibrary load?Function "internal_error" not defined. Make breakpoint pending on future sharedlibrary load?(yor [n]) [answered N; input not from terminal] Function "info_command" not defined. Make breakpoint pending on future sharedError in(yor [n]) [answered N; input not from terminal] /home/teawater/gdb/bgdbno/gdb/.gdbinit:8:fromsourcedcommand file: No breakpoint number 0. (gdb) start During symbol reading, DW_AT_name missingfp.c, lineDW_TAG_base_type. Temporary breakpoint 1 at 0x8048c74: file/home/teawater/gdb/bgdbno/gdb/a.out196.Starting program:fp.c:196Temporary breakpoint 1, main () atinternal-error: virtual196 init_floats(); (gdb) record (gdb) c Continuing. ../../src/gdb/utils.c:1200:detected,memoryexhausted. A problem internal to GDB has beeninternal-error: virtualfurther debugging may prove unreliable. Quit this debugging session? (y or n) n ../../src/gdb/utils.c:1200:detected,memoryexhausted. A problem internal to GDB has beenTrace/breakpointfurther debugging may prove unreliable. Create a core file of GDB? (y or n) n
Program received signal SIGTRAP,betrap.0xb7eba9bc in memcpy () from/lib/tls/i686/cmov/libc.so.6(gdb) quit A debugging session is active.
Inferior 1 [process 15657] willSnyder<msnyder@vmware.com>killed.
Quit anyway? (y or n) y
Thanks, Hui
On Mon, Aug 17, 2009 at 05:16, Michaelalso.wrote:paawan oza wrote:Hi Hui & Michael, Now we revert status registersthe patch inplease find the patch attached. I am sorry, if I am not pastingtime.email-body due to tabs&spacesproblem faced by Michael lastyour changesLooking good!Regards, Oza.
There were some conflicts betweenI've takenand acheck-in thathappened after your submission --fixing up thetheliberty of mergingyour changes with the cvs head,attached.conflicts. Hope youdon't mind -- merged patchfor thisI'll review your tests next.
Can you write up a change log entrypatch?Hui, Mark, any more comments?
Cheers, Michael
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |