This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/Ada] fix handling of minimal symbols (UNOP_CAST and UNOP_ADDR)


On 11/17/2017 12:47 AM, Joel Brobecker wrote:

> 
> Another manisfestation of this issue can be seen when trying to

typo: manisfestation -> manifestation

> insert an Ada exception catchpoint for a specific standard exception
> (this only occurs if the Ada runtime is built without debugging
> information, which is the default).  For instance:
> 
>     $ (gdb) catch exception constraint_error
>     warning: failed to reevaluate internal exception condition for catchpoint 0: 'constraint_error' has unknown type; cast it to its declared type
> 
> This is because, internally, the cachtpoint uses a condition referencing
> a minimal symbol, more precisely:

typo: "cachtpoint" -> "catchpoint"

> 
>    long_integer (e) = long_integer (&constraint_error)
> 
> This patch fixes all issues listed above:
> 
>   1. resolve_subexp: Special-case the handling of OP_VAR_MSYM_VALUE
>      expression elements, where there are no ambiguities to be resolved
>      in that situation;
> 
>   2. ada_evaluate_subexp: Enhance the handling of the UNOP_CAST
>      handling so as to process the case where the target of
>      the cast is a minimal symbol (as well as a symbol with debugging
>      information). This mimicks what's done in C.

typo: mimicks -> mimics

> 
> OK to push?

> +
> +if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list nodebug ]] != "" } {
> +  return -1
> +}
> +

Does the "nodebug" option actually exist?  I don't see it used anywhere else.
I think the usual thing is to pass an empty options string/list.

Otherwise looks great to me.  

Thanks much for doing this, and sorry that I didn't realize this needed
doing when the original feature went in.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]