Skip to content

Commit

Permalink
Alire.Utils.Switches: add -gnateE when debug info enabled (#1057)
Browse files Browse the repository at this point in the history
-gnateE adds extra info in exception messages.
  • Loading branch information
Fabien-Chouteau authored Jun 22, 2022
1 parent b2174e4 commit fb6d047
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/alire/alire-utils-gnat_switches.ads
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ is
GNAT_Enable_Inlining : constant Switch := "-gnatn";
GNAT_Asserts_And_Contracts : constant Switch := "-gnata";
GNAT_Debug_Info : constant Switch := "-g";
GNAT_Extra_Exception_Info : constant Switch := "-gnateE";
GNAT_Suppress_Runtime_Check : constant Switch := "-gnatp";
GNAT_Enable_Overflow_Check : constant Switch := "-gnato";
GNAT_Disable_Warn_No_Exception_Propagation : constant Switch := "-gnatw.X";
Expand Down
1 change: 1 addition & 0 deletions src/alire/alire-utils-switches-knowledge.adb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ package body Alire.Utils.Switches.Knowledge is
Register (GNAT_Warnings_As_Errors, "Warnings as errors");
Register (GNAT_Function_Sections, "Separate ELF section for each function");
Register (GNAT_Data_Sections, "Separate ELF section for each variable");
Register (GNAT_Extra_Exception_Info, "Extra information in exception messages");

Register (GNAT_Ada83, "Ada 83 Compatibility Mode");
Register (GNAT_Ada95, "Ada 95 Mode");
Expand Down
4 changes: 3 additions & 1 deletion src/alire/alire-utils-switches.adb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ package body Alire.Utils.Switches is
function Get_List (S : Debug_Info_Switches) return Switch_List
is (case S.Kind is
when No => Empty_List,
when Yes => Empty_List.Append (GNAT_Debug_Info),
when Yes => Empty_List
.Append (GNAT_Debug_Info)
.Append (GNAT_Extra_Exception_Info),
when Custom => S.List);

--------------
Expand Down

0 comments on commit fb6d047

Please sign in to comment.