[RFA 3/8] New port: TI C6x: shared library for dsbt

Pedro Alves pedro@codesourcery.com
Wed Jul 20 18:03:00 GMT 2011


On Wednesday 20 July 2011 03:07:05, Yao Qi wrote:
> +      error (_("Error reading DSBT exec loadmap\n"));
> +      exec_loadmap = NULL;
> +      return;

Code after error is unreacheable.  More instances of this.

> +  LOCAL FUNCTION
> +
> +  open_symbol_file_object
> +
> +  SYNOPSIS
> +
> +  void open_symbol_file_object (void *from_tty)

Any reason to this style (bfd's?) of function comments here?  The
GNU coding standards says:

"There is usually no purpose in restating the name of the function in the
comment before it, because the reader can see that for himself. "

> +static CORE_ADDR interp_text_sect_low;
> +static CORE_ADDR interp_text_sect_high;
> +static CORE_ADDR interp_plt_sect_low;
> +static CORE_ADDR interp_plt_sect_high;

It'd be nice if globals were moved to a per-pspace
structure, like solib-svr4.c, for multi-process.

> +   function may be freed via a single call to xfree().  */

GNU's coding standards say:

"Please do not write ‘()’ after a function name just to indicate it is a
function. foo () is not a function, it is a function call with no arguments."

(several instances of this)

> +  if (0 >= target_read_alloc (&current_target, TARGET_OBJECT_FDPIC,
> +                             "exec", (gdb_byte**)&buf))

Problem with the patch split?  TARGET_OBJECT_FDPIC isn't defined in
this patch or any of the previous ones.

-- 
Pedro Alves



More information about the Gdb-patches mailing list