2012-03-03 02:59:47 +01:00
|
|
|
# DESCRIPTION: Verilator: GDB startup file with useful defines
|
|
|
|
|
#
|
2024-01-01 09:19:59 +01:00
|
|
|
# Copyright 2012-2024 by Wilson Snyder. This program is free software; you
|
2020-03-21 16:24:24 +01:00
|
|
|
# can redistribute it and/or modify it under the terms of either the GNU
|
2012-03-03 02:59:47 +01:00
|
|
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
|
|
|
|
# Version 2.0.
|
2020-03-21 16:24:24 +01:00
|
|
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
2012-03-03 02:59:47 +01:00
|
|
|
|
|
|
|
|
define pn
|
2020-11-25 00:35:12 +01:00
|
|
|
call AstNode::dumpGdb($arg0)
|
2012-03-03 02:59:47 +01:00
|
|
|
end
|
|
|
|
|
document pn
|
|
|
|
|
Verilator: Print single AstNode NODEP
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
define pnt
|
2020-11-25 00:35:12 +01:00
|
|
|
call AstNode::dumpTreeGdb($arg0)
|
2012-03-03 02:59:47 +01:00
|
|
|
end
|
|
|
|
|
document pnt
|
|
|
|
|
Verilator: Print AstNode NODEP's tree
|
|
|
|
|
end
|
2012-04-28 18:22:38 +02:00
|
|
|
|
2024-03-28 12:32:18 +01:00
|
|
|
# Source python-based gdb config with jshow/jdiff definitions
|
|
|
|
|
# (Stored in separate file, so it can be highlighted/linted/formatted as Python)
|
|
|
|
|
python
|
|
|
|
|
import os
|
|
|
|
|
if "VERILATOR_ROOT" in os.environ:
|
|
|
|
|
gdbinit_py = os.environ["VERILATOR_ROOT"] + "/src/.gdbinit.py"
|
|
|
|
|
gdb.execute("source" + gdbinit_py)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
define jstash
|
|
|
|
|
call (char*) &(AstNode::dumpTreeJsonGdb($arg0)[0])
|
|
|
|
|
end
|
|
|
|
|
document jstash
|
|
|
|
|
Verilator: Perform a JSON dump of the given AST node and save it in value history (e.g. $1) for later
|
|
|
|
|
inspection using jtree. The node can be a pointer identifier or an address literal.
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
alias -a js=jstash
|
|
|
|
|
alias -a jt=jtree
|
|
|
|
|
|
2012-07-24 02:21:04 +02:00
|
|
|
define dtf
|
2020-11-25 00:35:12 +01:00
|
|
|
call AstNode::dumpTreeFileGdb($arg0, 0)
|
2012-07-24 02:21:04 +02:00
|
|
|
end
|
|
|
|
|
document dtf
|
|
|
|
|
Verilator: Dump AstNode tree to file
|
|
|
|
|
end
|
|
|
|
|
|
2012-04-28 18:22:38 +02:00
|
|
|
define watchedit
|
2022-12-29 19:58:19 +01:00
|
|
|
watch *(AstNode::s_editCntGbl)==$arg0
|
2012-04-28 18:22:38 +02:00
|
|
|
end
|
|
|
|
|
document watchedit
|
2022-12-10 03:06:27 +01:00
|
|
|
Verilator: Create watch on where an edit number is made
|
2012-04-28 18:22:38 +02:00
|
|
|
end
|