Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: debugging symbols and gdb



On Fri, Jan 04, 2019 at 10:28:56PM +0700, Robert Elz wrote:
>     Date:        Fri, 4 Jan 2019 10:43:52 +0000
>     From:        Patrick Welche <prlw1%cam.ac.uk@localhost>
>     Message-ID:  <20190104104352.GC611@quark>
> 
>   | I can try that as well, but my point is that I have them - file
>   | shows that they are built in, gdb says it loaded them. That no
>   | function of Xorg appears named in the backtrace is unlikely.
> 
> Purely a guess, as I have no idea how it works ir is supposed to
> work, but do you have ASLR (sysctl security.pax.aslr.enabled)
> enabled?

I have now:
- set security.pax.aslr.enabled=0 in /etc/sysctl.conf
- built with MKDEBUG
- ssh into the laptop, gdb `which X`, attach to /usr/X11R7/bin/X process
- login via xdm, and finally some symbols:

Thread 4 received signal SIGSEGV, Segmentation fault.
(gdb) bt
#0  sna_glyph_blt (drawable=drawable@entry=0x7f7ff43960c0, 
    gc=gc@entry=0x7f7ff4317830, _x=<optimized out>, _x@entry=17, 
    _y=<optimized out>, _y@entry=260, _n=<optimized out>, 
    _info=_info@entry=0x7f7fffffdef0, clip=clip@entry=0x7f7fffffdec0, 
    fg=16777215, bg=0, transparent=transparent@entry=false)
    at /usr/xsrc/external/mit/xf86-video-intel/dist/src/sna/sna_accel.c:15436
#1  0x00007f7fed6ad85d in sna_image_text16 (drawable=0x7f7ff43960c0, 
    gc=0x7f7ff4317830, x=17, y=260, count=<optimized out>, 
    chars=<optimized out>)
    at /usr/xsrc/external/mit/xf86-video-intel/dist/src/sna/sna_accel.c:15914
#2  0x0000000000367a48 in damageImageText16 (pDrawable=0x7f7ff43960c0, 
    pGC=0x7f7ff4317830, x=17, y=260, count=4, chars=0x7f7ff43a9024)
    at /usr/xsrc/external/mit/xorg-server/dist/miext/damage/damage.c:1390
#3  0x00000000002803a7 in ?? ()
#4  0x0000000000280c95 in ImageText ()
#5  0x0000000000284667 in ProcImageText16 ()
#6  0x0000000000286796 in Dispatch ()
#7  0x000000000025aabf in dix_main ()
#8  0x000000000025a653 in ___start ()
#9  0x00007f7ff7c03498 in _rtld (sp=<optimized out>, relocbase=<optimized out>)
    at /usr/src/libexec/ld.elf_so/rtld.c:551
#10 0x0000000000000000 in ()
(gdb) list
15431                           b[2] = (uint16_t)(y1+h) << 16 | (uint16_t)(x1+w);
15432                           {
15433                                   uint64_t *src = (uint64_t *)c->bits;
15434                                   uint64_t *dst = (uint64_t *)(b + 3);
15435                                   do  {
15436                                           *dst++ = *src++;
15437                                           len -= 2;
15438                                   } while (len);
15439                           }
15440   
(gdb) print dst
$1 = (uint64_t *) 0x7f7ff7a8004c
(gdb) print src
$2 = (uint64_t *) 0x18000700cb0171
(gdb) print *dst
$3 = 2213545344
(gdb) print *src
Cannot access memory at address 0x18000700cb0171
(gdb) print *c
$4 = {metrics = {leftSideBearing = 0, rightSideBearing = 0, 
    characterWidth = 0, ascent = 0, descent = 0, attributes = 0}, 
  bits = 0x18000700cb0169 <error: Cannot access memory at address 0x18000700cb0169>}
(gdb) print b
$5 = (uint32_t *) 0x7f7ff7a80038
(gdb) print *b
$6 = 1279330305
(gdb) print b[2]
$7 = 18547363


P


Home | Main Index | Thread Index | Old Index