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: [PATCH][ARM][GDB]: gdb cannot step across CMSE secure entry function code.


>>>>> "Alan" == Alan Hayward <Alan.Hayward@arm.com> writes:

>> +  struct bound_minimal_symbol minsym;
>> +  char *target_name;
>> +  int target_len = strlen (name) + strlen ("__acle_se_") + 1;
>> +  target_name = (char *) alloca (target_len);

Alan> You might as well put “char *” on the start of the line, and remove the
Alan> declaration of target_name two lines ago.

>> +  snprintf (target_name, target_len, "%s%s", "__acle_se_",name);

Occasionally I think we should remove all uses of alloca from gdb, since
alloca is often just a bug waiting to happen.  However, since gdb still
uses it, the above could either be written using the libiberty ACONCAT
macro; or if not that, then xsnprintf would be preferable.

>> +set opts [list debug "additional_flags=-g -dA"]

I am curious whether -dA is needed here, and if so why.
If it is necessary then a comment would be nice.

thanks,
Tom


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