This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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] Support inline stacks in objdump


On 18 Mar 2017 16:36, Andi Kleen wrote:
> @@ -257,6 +258,7 @@ usage (FILE *stream, int status)
>        --insn-width=WIDTH         Display WIDTH bytes on a single line for -d\n\
>        --adjust-vma=OFFSET        Add OFFSET to all displayed section addresses\n\
>        --special-syms             Include special symbols in symbol dumps\n\
> +      --inlines			 Unwind inlines (with -l)\n\

only use spaces for indentation, not tabs

> @@ -348,6 +351,7 @@ static struct option long_options[]=
>    {"dwarf-depth",      required_argument, 0, OPTION_DWARF_DEPTH},
>    {"dwarf-start",      required_argument, 0, OPTION_DWARF_START},
>    {"dwarf-check",      no_argument, 0, OPTION_DWARF_CHECK},
> +  {"inlines",	       no_argument, 0, OPTION_INLINES},

please don't use tabs

> +      if (unwind_inlines)
> +	{
> +	  const char *filename2;
> +	  const char *functionname2;
> +	  unsigned line2;
> +
> +	  while (bfd_find_inliner_info (abfd, &filename2, &functionname2,
> +					&line2))
> +	    {
> +	      printf ("inlined by %s:%d (%s)\n", filename2, line2,
> +		      functionname2);

line2 is unsigned, so should use %u instead of %d

> @@ -3808,6 +3826,9 @@ main (int argc, char **argv)
>  	  if (insn_width <= 0)
>  	    fatal (_("error: instruction width must be positive"));
>  	  break;
> +	case OPTION_INLINES:
> +	  unwind_inlines = 1;

use a bfd_boolean, and TRUE/FALSE
-mike

Attachment: signature.asc
Description: Digital signature


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