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] Read corrrect auxiliary entry in AIX.


"Ulrich Weigand" <uweigand@de.ibm.com> wrote on 11/24/2016 07:45:35 PM:

> From: "Ulrich Weigand" <uweigand@de.ibm.com>
> To: Sangamesh Mallayya/India/IBM@IBMIN
> Cc: gdb-patches@sourceware.org, Ulrich.Weigand@de.ibm.com (Ulrich 
Weigand)
> Date: 11/24/2016 07:45 PM
> Subject: Re: [PATCH] Read corrrect auxiliary entry in AIX.
> 
> Sangamesh Mallayya wrote:
> 
> > Thanks for the suggested patch and i totally agree.
> > Pasted the changes below i have it right now. Perhaps some comments 
might
> > need some more editing.
> 
> Agreed.
> 
> > Didn't see any new regression failures with this change.
> > 
> > I will check this with the master branch and run the tests again.
> > Let me know your view on this.
> 
> 
> > +          if (cs->c_naux > 1 && ISFCN (cs->c_type))
> > +          {
> > +              /* a function entry point.  */
> > +
> > +              fcn_start_addr =3D cs->c_value;
> > +
> > +              /* save the function header info, which will be used
> > +                 when `.bf' is seen.  */
> > +              fcn_cs_saved =3D *cs;=20
> > +
> > +            /* Convert the auxent to something we can access.  */
> > +             bfd_coff_swap_aux_in (abfd, raw_auxptr, cs->c_type,=20
> > cs->c_sclass,
> > +                               0, cs->c_naux, &fcn_aux_saved);
> > +              continue;
> > +          }
> > +          /* Read the csect auxiliary header, which is always the 
last by=
> > =20
> > 
> > +             convention. */
> > +          else
> 
> Don't need the "else" here due to the "continue" above.
> 
> >               switch (CSECT_SCLAS (&main_aux))
> >                 {
> > -               case XMC_PR:
> > -                 /* a function entry point.  */
> > -               function_entry_point:
> > -
> > -                 fcn_start_addr =3D cs->c_value;
> > -
> > -                 /* save the function header info, which will be used
> > -                    when `.bf' is seen.  */
> > -                 fcn_cs_saved =3D *cs;
> > -                 fcn_aux_saved =3D main_aux;
> > -                 continue;
> 
> It seems that all classes of XTY_LD now simply do "continue",
> so the whole inner switch seems no longer necessary.
> 
> Otherwise, looks reasonable to me if the tests pass.
> 
Yes, all other switch inside XTY_LD are just doing continue.
But thought we just keep it for reference so that it is just a indication 
of XTY_LD case.
Are else do you thing making them "#if 0" would be better or should we 
remove it completely ?

I will do one more round of test and make sure we don't see any new 
failures with new change.




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