From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61683 invoked by alias); 23 Jul 2018 10:31:07 -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 61671 invoked by uid 89); 23 Jul 2018 10:31:06 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=3.2 required=5.0 tests=AWL,BAYES_00,FOREIGN_BODY,SPF_PASS,T_FILL_THIS_FORM_SHORT autolearn=no version=3.3.2 spammy=E-Mail, EMail, keine, diese X-HELO: dedi548.your-server.de Received: from dedi548.your-server.de (HELO dedi548.your-server.de) (85.10.215.148) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 23 Jul 2018 10:31:04 +0000 Received: from [78.46.172.3] (helo=sslproxy06.your-server.de) by dedi548.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1fhY7J-0003Ki-W3; Mon, 23 Jul 2018 12:31:02 +0200 Received: from [82.135.62.35] (helo=mail.embedded-brains.de) by sslproxy06.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1fhY7J-000Xmu-Ox; Mon, 23 Jul 2018 12:31:01 +0200 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 602112A1685; Mon, 23 Jul 2018 12:31:08 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id hEOhRbKECMIE; Mon, 23 Jul 2018 12:31:07 +0200 (CEST) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id B20B82A1686; Mon, 23 Jul 2018 12:31:07 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id tN4wIoF4WNBc; Mon, 23 Jul 2018 12:31:07 +0200 (CEST) Received: from [192.168.96.149] (unknown [192.168.96.149]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 6743C2A1685; Mon, 23 Jul 2018 12:31:07 +0200 (CEST) Subject: Re: [PATCH] RISC-V: Don't decrement pc after break. To: Jim Wilson , gdb-patches@sourceware.org Cc: andrew.burgess@embecosm.com References: <20180717001241.25908-1-jimw@sifive.com> From: Sebastian Huber Message-ID: <71103f9b-f83b-7e68-1d56-f30038473936@embedded-brains.de> Date: Mon, 23 Jul 2018 10:31:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180717001241.25908-1-jimw@sifive.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-07/txt/msg00657.txt.bz2 Hello Jim, this patch broke debugging with Qemu (qemu-system-riscv64, Git commit=20 6598f0cdad6acc6674c4f060fa46e537228c2c47).=C2=A0 The GDB error message is: Register 3921 is not available A backtrace of the GDB run with a break point set the throw_error() yields: Breakpoint 1, throw_error (error=3Derror@entry=3DNOT_AVAILABLE_ERROR,=20 fmt=3Dfmt@entry=3D0x87b0c0 "Register %d is not available") at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/common/common-exceptions.c:390 390=C2=A0=C2=A0=C2=A0=C2=A0 { Missing separate debuginfos, use: zypper install=20 libexpat1-debuginfo-2.1.0-24.1.x86_64=20 libgmp10-debuginfo-5.1.3-7.15.x86_64=20 libmpfr4-debuginfo-3.1.2-13.15.x86_64=20 libncurses5-debuginfo-5.9-62.1.x86_64=20 libpython2_7-1_0-debuginfo-2.7.13-27.3.1.x86_64=20 python-base-debuginfo-2.7.13-27.3.1.x86_64 (gdb) bt #0=C2=A0 throw_error (error=3Derror@entry=3DNOT_AVAILABLE_ERROR,=20 fmt=3Dfmt@entry=3D0x87b0c0 "Register %d is not available") at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/common/common-exceptions.c:390 #1=C2=A0 0x0000000000578552 in frame_unwind_register_unsigned=20 (next_frame=3D, regnum=3Dregnum@entry=3D834) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/frame.c:1308 #2=C2=A0 0x000000000057857c in get_frame_register_unsigned=20 (frame=3Dframe@entry=3D0xb933c0, regnum=3Dregnum@entry=3D834) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/frame.c:1322 #3=C2=A0 0x0000000000413d7d in riscv_read_misa_reg (read_p=3D) at /home/EB/sebastian_h/archive/binutils-git/gdb/riscv-tdep.c:306 #4=C2=A0 riscv_has_feature (gdbarch=3D0xc50cc0, feature=3D) = at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/riscv-tdep.c:338 #5=C2=A0 0x00000000004149de in riscv_breakpoint_kind_from_pc=20 (gdbarch=3D, pcptr=3D) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/riscv-tdep.c:416 #6=C2=A0 0x00000000004b3ef1 in default_breakpoint_from_pc (gdbarch=3D0xc50c= c0,=20 pcptr=3D, lenptr=3D0x7fffffffd014) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/arch-utils.c:833 #7=C2=A0 0x00000000004ccbb1 in program_breakpoint_here_p (gdbarch=3D, address=3D2147498700) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/breakpoint.c:8656 #8=C2=A0 0x00000000004ccdb6 in bp_loc_is_permanent (loc=3D0xd982a0) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/breakpoint.c:8694 #9=C2=A0 add_location_to_breakpoint (b=3Db@entry=3D0xd7b5f0,=20 sal=3Dsal@entry=3D0x7fffffffd0f0) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/breakpoint.c:8638 #10 0x00000000004cceab in init_raw_breakpoint (b=3D0xd7b5f0,=20 gdbarch=3D, sal=3D..., bptype=3Dbp_breakpoint, ops=3D) at /home/EB/sebastian_h/archive/binutils-git/gdb/breakpoint.c:7200 #11 0x00000000004d0fa8 in init_breakpoint_sal (b=3D0xd7b5f0,=20 gdbarch=3D0xc50cc0, sals=3D..., location=3D..., filter=3D..., cond_string= =3D...,=20 extra_string=3D..., type=3Dbp_breakpoint, disposition=3Ddisp_donttouch,=20 thread=3D-1, task=3D0, ignore_count=3D0, ops=3D0xa555e0 , =C2=A0=C2=A0=C2=A0 from_tty=3D0, enabled=3D1, flags=3D0, display_canonical= =3D0,=20 internal=3D) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/breakpoint.c:8828 #12 0x00000000004d7b12 in create_breakpoint_sal=20 (display_canonical=3D, flags=3D,=20 internal=3D, enabled=3D, from_tty=3D, ops=3D, ignore_count=3D, task=3D, =C2=A0=C2=A0=C2=A0 thread=3D, disposition=3D= ,=20 type=3D, extra_string=3D..., cond_string=3D..., filter=3D...= ,=20 location=3D..., sals=3D..., gdbarch=3D) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/breakpoint.c:8932 #13 create_breakpoints_sal (flags=3D, internal=3D, enabled=3D, from_tty=3D, ops=3D, ignore_count=3D, task=3D,=20 thread=3D, disposition=3D, =C2=A0=C2=A0=C2=A0 type=3D, extra_string=3D..., cond_string= =3D...,=20 canonical=3D0x7fffffffd3c0, gdbarch=3D) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/breakpoint.c:8984 #14 create_breakpoints_sal_default (flags=3D,=20 internal=3D, enabled=3D, from_tty=3D, ops=3D, ignore_count=3D, task=3D, thread=3D, disposition=3D, =C2=A0=C2=A0=C2=A0 type_wanted=3D, extra_string=3D..., cond= _string=3D...,=20 canonical=3D0x7fffffffd3c0, gdbarch=3D) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/breakpoint.c:13806 #15 bkpt_create_breakpoints_sal (gdbarch=3D,=20 canonical=3D0x7fffffffd3c0, cond_string=3D..., extra_string=3D...,=20 type_wanted=3D, disposition=3D,=20 thread=3D, task=3D, ignore_count=3D, =C2=A0=C2=A0=C2=A0 ops=3D, from_tty=3D, enab= led=3D, internal=3D, flags=3D) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/breakpoint.c:12608 #16 0x00000000004d8454 in create_breakpoint (gdbarch=3D0xc50cc0,=20 location=3Dlocation@entry=3D0xc76770, cond_string=3Dcond_string@entry=3D0x0= ,=20 thread=3D, thread@entry=3D0, extra_string=3D,= =20 extra_string@entry=3D0xc70bcb "", parse_extra=3Dparse_extra@entry=3D1, =C2=A0=C2=A0=C2=A0 tempflag=3D, type_wanted=3D,=20 ignore_count=3D, pending_break_support=3D,=20 ops=3D, from_tty=3D, enabled=3D,=20 internal=3D, flags=3D) =C2=A0=C2=A0=C2=A0 at /home/EB/sebastian_h/archive/binutils-git/gdb/breakp= oint.c:9357 #17 0x00000000004d8901 in break_command_1 (arg=3D,=20 flag=3D, from_tty=3D0) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/breakpoint.c:9436 #18 0x00000000006bc292 in cmd_func (cmd=3D, args=3D, from_tty=3D) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/cli/cli-decode.c:1857 #19 0x000000000067ae6e in execute_command (p=3D,=20 p@entry=3D0xc70bc0 "b bsp_reset", from_tty=3D0) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/top.c:630 #20 0x000000000056b26c in command_handler (command=3D0xc70bc0 "b=20 bsp_reset") at /home/EB/sebastian_h/archive/binutils-git/gdb/event-top.c:583 #21 0x000000000067b981 in read_command_file=20 (stream=3Dstream@entry=3D0xc70960) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/top.c:424 #22 0x00000000006bffae in script_from_file=20 (stream=3Dstream@entry=3D0xc70960, file=3Dfile@entry=3D0x7fffffffde4a=20 "~/bin/riscv.gdb") at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/cli/cli-script.c:1551 #23 0x00000000006b9feb in source_script_from_stream=20 (file_to_open=3D0x7fffffffde4a "~/bin/riscv.gdb", file=3D0x7fffffffde4a=20 "~/bin/riscv.gdb", stream=3D0xc70960) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/cli/cli-cmds.c:567 #24 source_script_with_search (file=3D0x7fffffffde4a "~/bin/riscv.gdb",=20 from_tty=3D, search_path=3D) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/cli/cli-cmds.c:603 #25 0x00000000005c6a18 in catch_command_errors (command=3D0x6ba0d0=20 , arg=3D0x7fffffffde4a "~/bin/riscv.gdb",= =20 from_tty=3D1) at /home/EB/sebastian_h/archive/binutils-git/gdb/main.c:379 #26 0x00000000005c76c1 in captured_main_1 (context=3D0x7fffffffd6e0) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/main.c:1121 #27 captured_main (data=3D0x7fffffffd6e0) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/main.c:1147 #28 gdb_main (args=3Dargs@entry=3D0x7fffffffd810) at=20 /home/EB/sebastian_h/archive/binutils-git/gdb/main.c:1173 #29 0x000000000040dba5 in main (argc=3D, argv=3D) at /home/EB/sebastian_h/archive/binutils-git/gdb/gdb.c:32 --=20 Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine gesch=C3=A4ftliche Mitteilung im Sinne des EHUG.