From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5891 invoked by alias); 8 Feb 2014 18:36:31 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 5880 invoked by uid 89); 8 Feb 2014 18:36:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL,T_FRT_BELOW2 autolearn=no version=3.3.2 X-HELO: mail1.asahi-net.or.jp Received: from mail1.asahi-net.or.jp (HELO mail1.asahi-net.or.jp) (202.224.39.197) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 08 Feb 2014 18:36:28 +0000 Received: from sa76r4 (y081184.ppp.asahi-net.or.jp [118.243.81.184]) by mail1.asahi-net.or.jp (Postfix) with ESMTP id C31FB9216D; Sun, 9 Feb 2014 03:36:25 +0900 (JST) Received: from sa76r4.ysato.dip.jp (localhost [127.0.0.1]) by sa76r4 (Postfix) with ESMTP id 70F69FD; Sun, 9 Feb 2014 03:36:25 +0900 (JST) Date: Sat, 08 Feb 2014 18:36:00 -0000 Message-ID: <877g95fo46.wl%ysato@users.sourceforge.jp> From: Yoshinori Sato To: Mark Kettenis Cc: palves@redhat.com, gdb-patches@sourceware.org Subject: Re: [PATCH] h8300 "info registers" broken In-Reply-To: <201402051759.s15Hx0JB002993@glazunov.sibelius.xs4all.nl> References: <8738k3j95o.wl%ysato@users.sourceforge.jp> <52F14184.9020803@redhat.com> <878utpfnxs.wl%ysato@users.sourceforge.jp> <201402051759.s15Hx0JB002993@glazunov.sibelius.xs4all.nl> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/24.3 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-IsSubscribed: yes X-SW-Source: 2014-02/txt/msg00250.txt.bz2 At Wed, 5 Feb 2014 18:59:00 +0100 (CET), Mark Kettenis wrote: > > > Date: Thu, 06 Feb 2014 02:51:11 +0900 > > From: Yoshinori Sato > > > Can you explain the patch to me a little bit more, please? > > > It's not obvious to me at all what the register names > > > have to with the proposed change. > > > > Current h8300-tdep have two problems. > > 1. Size mismatch in pseudo register vs raw register. > > So overflow on register cache. > > That doesn't make sense. Pseudo registers don't live in the register > cache. Instead they are synthesised from the contents of the register > cache. > > > 2. Undisplay pseudo regsters. > > Not sure what you're trying to say here. But if you don't want to > show a pseudo register, why do you have it in the first place? OK. I trying latest version. I got result bellow. ysato@sa76r4:~/dev/binutils-gdb/h8300$ LANG=C gdb gdb/gdb GNU gdb (GDB) 7.6.2 (Debian 7.6.2-1) Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /home/ysato/dev/binutils-gdb/h8300/gdb/gdb...done. warning: File "/home/ysato/dev/binutils-gdb/h8300/gdb/gdb-gdb.gdb" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". To enable execution of this file add add-auto-load-safe-path /home/ysato/dev/binutils-gdb/h8300/gdb/gdb-gdb.gdb line to your configuration file "/home/ysato/.gdbinit". To completely disable this security protection add set auto-load safe-path / line to your configuration file "/home/ysato/.gdbinit". For more information about this security protection see the "Auto-loading safe path" section in the GDB manual. E.g., run from the shell: info "(gdb)Auto-loading safe path" (gdb) r test Starting program: /home/ysato/dev/binutils-gdb/h8300/gdb/gdb test warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? GNU gdb (GDB) 7.7.50.20140208-cvs Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=h8300-elf". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from test...(no debugging symbols found)...done. (gdb) target sim Connected to the simulator. (gdb) load Loading section .text, size 0x4 vma 0x100 Start address 0x100 Transfer rate: 32 bits in <1 sec. (gdb) b *0x100 Breakpoint 1 at 0x100 (gdb) r Starting program: /home/ysato/dev/binutils-gdb/h8300/test Breakpoint 1, 0x00000100 in start () (gdb) si 0x00000102 in start () (gdb) 0x00000102 in start () (gdb) info registers r0 0x00000000 0 r1 0x00000000 0 r2 0x00000000 0 r3 0x00000000 0 r4 0x00000000 0 r5 0x00000000 0 r6 0x00000000 0 sp 0x00000000 0 memory clobbered past end of allocated block Program received signal SIGABRT, Aborted. 0x00007ffff6aaf1d5 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007ffff6aaf1d5 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00007ffff6ab2388 in __GI_abort () at abort.c:90 #2 0x00007ffff6aea7bb in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffff6be4bee "%s") at ../sysdeps/unix/sysv/linux/libc_fatal.c:199 #3 0x00007ffff6aea89e in __GI___libc_fatal ( message=0x7ffff6be8328 "memory clobbered past end of allocated block\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:210 #4 0x00007ffff6afaca5 in mabort (status=) at mcheck.c:364 #5 0x00007ffff6afad6b in checkhdr (hdr=) at mcheck.c:115 #6 checkhdr (hdr=) at mcheck.c:86 #7 0x00007ffff6afb0f5 in freehook (ptr=0xd90040, caller=0x49fedc ) at mcheck.c:188 #8 0x000000000049fedc in value_free (val=0xd90440) at ../../gdb/value.c:1437 #9 0x00000000005b919f in frame_register_unwind (frame=, regnum=regnum@entry=13, optimizedp=optimizedp@entry=0x7fffffffe088, unavailablep=0x7fff00000003, unavailablep@entry=0x7fffffffe08c, lvalp=lvalp@entry=0x7fffffffe094, addrp=addrp@entry=0x7fffffffe098, realnump=realnump@entry=0x7fffffffe090, bufferp=0x7fffffffe0b0 "") at ../../gdb/frame.c:1032 #10 0x00000000005b954e in frame_unwind_register (frame=, regnum=13, buf=) at ../../gdb/frame.c:1064 ---Type to continue, or q to quit--- #11 0x00000000005b960c in frame_unwind_register_signed (frame=0xd453f0, regnum=regnum@entry=13) at ../../gdb/frame.c:1162 #12 0x00000000005b963c in get_frame_register_signed ( frame=frame@entry=0xd454b0, regnum=regnum@entry=13) at ../../gdb/frame.c:1169 #13 0x0000000000408c9b in h8300_print_register ( gdbarch=gdbarch@entry=0xd768c0, file=file@entry=0xd66eb0, frame=frame@entry=0xd454b0, regno=13) at ../../gdb/h8300-tdep.c:1007 #14 0x00000000004090d8 in h8300_print_registers_info (gdbarch=0xd768c0, file=0xd66eb0, frame=0xd454b0, regno=8, cpregs=) at ../../gdb/h8300-tdep.c:1082 #15 0x00000000005af307 in execute_command (p=, p@entry=0xcbe3a0 "info registers ", from_tty=1) at ../../gdb/top.c:458 #16 0x00000000004faf11 in command_handler (command=0xcbe3a0 "info registers ") at ../../gdb/event-top.c:435 #17 0x00000000004fb37c in command_line_handler (rl=) at ../../gdb/event-top.c:632 #18 0x0000000000615980 in rl_callback_read_char () at ../../readline/callback.c:220 #19 0x00000000004faf79 in rl_callback_read_char_wrapper ( client_data=) at ../../gdb/event-top.c:164 #20 0x00000000004f9c43 in process_event () at ../../gdb/event-loop.c:342 #21 0x00000000004f9f97 in gdb_do_one_event () at ../../gdb/event-loop.c:406 ---Type to continue, or q to quit--- #22 0x00000000004fa1b7 in start_event_loop () at ../../gdb/event-loop.c:431 #23 0x00000000004f3b23 in captured_command_loop (data=data@entry=0x0) at ../../gdb/main.c:266 #24 0x00000000004f134a in catch_errors ( func=func@entry=0x4f3b10 , func_args=func_args@entry=0x0, errstring=errstring@entry=0x68cdb5 "", mask=mask@entry=RETURN_MASK_ALL) at ../../gdb/exceptions.c:524 #25 0x00000000004f4826 in captured_main (data=data@entry=0x7fffffffe490) at ../../gdb/main.c:1054 #26 0x00000000004f134a in catch_errors ( func=func@entry=0x4f3e00 , func_args=func_args@entry=0x7fffffffe490, errstring=errstring@entry=0x68cdb5 "", mask=mask@entry=RETURN_MASK_ALL) at ../../gdb/exceptions.c:524 #27 0x00000000004f4cfb in gdb_main (args=args@entry=0x7fffffffe490) at ../../gdb/main.c:1062 #28 0x0000000000407815 in main (argc=, argv=) at ../../gdb/gdb.c:33 (gdb) -- Yoshinori Sato