From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fernando Nasser To: gdb-patches@sources.redhat.com, Nick Clifton Subject: RFA: [buildsym.c] Turn off unused addr bits in linetable Date: Mon, 12 Mar 2001 17:01:00 -0000 Message-id: <3AAD70B6.A9C16F36@redhat.com> X-SW-Source: 2001-03/msg00182.html Some systems like ARM may have extra bits set in the address to indicate a mode or something else (the LSB=1 means thumb mode for ARM). So, before storing line number addresses we may need to turn this bits off as they may be passed to gdb with the bits on as result of relocation (ld has no way of knowing it is for a line table entry). The following patch passes the line addresses through the target dependent macro ADDR_BITS_REMOVE() before storing it on the table. OK to commit? ChangeLog: * buildsym.c (record_line): Turn off unused addr bits. -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9 Index: gdb/buildsym.c =================================================================== RCS file: /cvs/cvsfiles/devo/gdb/buildsym.c,v retrieving revision 2.104 diff -c -p -r2.104 buildsym.c *** buildsym.c 2000/02/21 10:02:58 2.104 --- buildsym.c 2001/03/12 23:50:04 *************** record_line (register struct subfile *su *** 725,731 **** e = subfile->line_vector->item + subfile->line_vector->nitems++; e->line = line; ! e->pc = pc; } /* Needed in order to sort line tables from IBM xcoff files. Sigh! */ --- 725,731 ---- e = subfile->line_vector->item + subfile->line_vector->nitems++; e->line = line; ! e->pc = ADDR_BITS_REMOVE(pc); } /* Needed in order to sort line tables from IBM xcoff files. Sigh! */ >From msnyder@cygnus.com Mon Mar 12 17:02:00 2001 From: Michael Snyder To: Kevin Buettner Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH RFC] solib-svr4 cleanups Date: Mon, 12 Mar 2001 17:02:00 -0000 Message-id: <3AAD6EE2.A8BA21B0@cygnus.com> References: <1010302200140.ZM22868@ocotillo.lan> <1010310063020.ZM4272@ocotillo.lan> <3AAD24ED.6038BBA8@cygnus.com> <1010312195449.ZM14150@ocotillo.lan> <3AAD5B9C.7C4EA0BC@cygnus.com> <1010313000757.ZM14597@ocotillo.lan> X-SW-Source: 2001-03/msg00183.html Content-length: 669 Kevin Buettner wrote: > > On Mar 12, 3:28pm, Michael Snyder wrote: > > > > The _SYSCALL32 define was only needed for the (legacy) link_map stuff. > > > It has been moved to solib-legacy.c. > > > > OK, good. Sorry I haven't been following the discussion with full > > attention. You've tested the new method on sparc64 solaris, then? > > I think so. I tried to verify it just now, but unfortunately > I'm unable to login to the machine that I did my testing on. > > In any event, I ran into problems when I *didn't* have _SYSCALL32 > defined in solib-legacy.h. When I moved the define from solib-svr4.c > to solib-legacy.c, things worked fine. OK, I'm happy.