aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/elab-vhdl_debug.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-05-15 11:53:35 +0200
committerTristan Gingold <tgingold@free.fr>2022-05-15 13:35:36 +0200
commit4d499ee7995babe3c602b66379c3290c18cad0f2 (patch)
tree7cb20db03d2c018c71bacd12a9a80da73068d0d6 /src/synth/elab-vhdl_debug.adb
parent1d4483054c8f0906110e3619053de6bad0263561 (diff)
downloadghdl-4d499ee7995babe3c602b66379c3290c18cad0f2.tar.gz
ghdl-4d499ee7995babe3c602b66379c3290c18cad0f2.tar.bz2
ghdl-4d499ee7995babe3c602b66379c3290c18cad0f2.zip
elab-vhdl_debug(disp_instance_path): show top-level unit
Diffstat (limited to 'src/synth/elab-vhdl_debug.adb')
-rw-r--r--src/synth/elab-vhdl_debug.adb18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/synth/elab-vhdl_debug.adb b/src/synth/elab-vhdl_debug.adb
index e7cc2fc1e..f774059fa 100644
--- a/src/synth/elab-vhdl_debug.adb
+++ b/src/synth/elab-vhdl_debug.adb
@@ -959,7 +959,7 @@ package body Elab.Vhdl_Debug is
return Get_Instance_Parent (Pre_Parent);
end Get_Instance_Path_Parent;
- procedure Disp_Instance_Path_1 (Inst : Synth_Instance_Acc)
+ procedure Disp_Instance_Path (Inst : Synth_Instance_Acc)
is
Pre_Parent_Inst : constant Synth_Instance_Acc :=
Skip_Instance_Parent (Inst);
@@ -968,6 +968,10 @@ package body Elab.Vhdl_Debug is
Stmt : Node;
begin
if Pre_Parent_Inst = null then
+ -- The top unit
+ Put ('/');
+ Parent_Scope := Get_Source_Scope (Inst);
+ Put (Image (Get_Identifier (Get_Entity (Parent_Scope))));
return;
end if;
@@ -991,17 +995,5 @@ package body Elab.Vhdl_Debug is
Put (")");
end;
end if;
- end Disp_Instance_Path_1;
-
- procedure Disp_Instance_Path (Inst : Synth_Instance_Acc)
- is
- Parent : constant Synth_Instance_Acc := Get_Instance_Parent (Inst);
- begin
- if Parent = null then
- -- The root.
- Put ('/');
- else
- Disp_Instance_Path_1 (Inst);
- end if;
end Disp_Instance_Path;
end Elab.Vhdl_Debug;