Giter Club home page Giter Club logo

Comments (5)

palmer-dabbelt avatar palmer-dabbelt commented on August 29, 2024

I just built the latest master on Ubuntu 14.04 and I don't get any errors. sim/common/cgen-types.h makes it look like SIM_HAVE_MODEL is always defined, which sim/common/sim-cpu.h uses to define CPU_MACH and CPU_MODEL.

Can you try some standard stuff like doing a clean clone and build? If that doesn't work, can you give me some details of your setup so I can try and actually fix this?

I believe this is the correct repository to point to, not riscv-gdb.

from riscv-binutils-gdb.

palmer-dabbelt avatar palmer-dabbelt commented on August 29, 2024

I'm trying to get a version of our stuff rebased on upstream's HEAD, and I'm seeing these errors. I'm not sure why you're getting them and I'm not, but with any luck I'll end up fixing this.

from riscv-binutils-gdb.

palmer-dabbelt avatar palmer-dabbelt commented on August 29, 2024

I don't know what github is doing with the issues, but how does this look

commit 3d29d2a30eb2efd30f8d01a0f4811a3438ebffee
Author: Palmer Dabbelt <[email protected]>
Date:   Sun Nov 8 23:49:42 2015 -0800

    Fix RISC-V sim for new binutils/gdb versions

    I'm not sure when or why this broke, or why adding tconfig.h fixes it, but it
    appears to.  Note that if I add tconfig.h and don't do a clean build then I get
    some linking errors.

    Pretty much all of this came from the bfin sim port, as that looks most similar
    to ours.

diff --git a/sim/riscv/machs.c b/sim/riscv/machs.c
index ef08319..c968109 100644
--- a/sim/riscv/machs.c
+++ b/sim/riscv/machs.c
@@ -21,6 +21,10 @@
 #include "config.h"

 #include "sim-main.h"
+#include "gdb/sim-riscv.h"
+#include "bfd.h"
+
+#include "sim-hw.h"

 static void
 riscv_model_init (SIM_CPU *cpu)
diff --git a/sim/riscv/tconfig.h b/sim/riscv/tconfig.h
new file mode 100644
index 0000000..b109533
--- /dev/null
+++ b/sim/riscv/tconfig.h
@@ -0,0 +1,2 @@
+/* This was copied from bfin, and is listed as a hack there.  */
+#define SIM_HAVE_MODEL

from riscv-binutils-gdb.

cliffordwolf avatar cliffordwolf commented on August 29, 2024

I've checked out riscv-rebase-2015.10.08 (3d29d2a) from your git repo and I can successfully build gdb from it using the following commands:

mkdir build && cd build
../configure --target=riscv32-unknown-elf --prefix=/opt/riscv32i
make -j4 && make install

Thanks!

Maybe you can also point me in the right direction or refer me to the right person to ask regarding the following issue:

I want to write a gdbserver for PicoRV32 (going to implement a hw debug interface for it). According to the gdb docs only the following packets need to be implemented for a minimal gdb server: g, G, m, M, c, s. However, when the gdb I just built connects to my dummy gdb server I just wrote I see the following requests sent to by gdb:

$qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;vContSupported+#ff
$Hg0#df
$qTStatus#49
$?#3f
$qfThreadInfo#bb
$qL1200000000000000000#50
$Hc-1#09
$qC#b4
$qAttached#8f

(Note that none of them is in g, G, m, M, c, s.)

I respond to all of them by sending +, followed by $#00, as this is the respond that I should send for an unsupported command, according to the docs as I understand them. After that sequence of pkts sent to my gdb server, gdb just hangs. This is the output I see:

(gdb) target remote :1234
Remote debugging using :1234
warning: Invalid remote reply: 

Is there an existing simple gdb stub (preferably for RISC-V) that I could use as a reference? Any other useful hints that might help me?

from riscv-binutils-gdb.

vapier avatar vapier commented on August 29, 2024

you probably want to use the sw-dev mailing list for questions like this

from riscv-binutils-gdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.