[prev in list] [next in list] [prev in thread] [next in thread]
List: oprofile-list
Subject: Re: [PATCH] Handle recent change in binutils which removed "dotted" symbols from elf64
From: John Levon <levon () movementarian ! org>
Date: 2005-03-31 1:48:48
Message-ID: 20050331014848.GA99056 () compsoc ! man ! ac ! uk
[Download RAW message or body]
On Wed, Mar 30, 2005 at 07:07:02PM -0600, Maynard P. Johnson wrote:
> I think the attached patch addresses most of your issues, with the exception
> of the platform check. If you still have a problem with that. let me know.
I'd at like an answer before applying, yeah.
+uint op_bfd::process_symtab(bfd * ibfd, size_t start) {
Brace still in wrong place.
+ asymbol *synthsyms;
check_style.py will tell you what's wrong (it's the only remaining error
found by the script currently).
+ // synth_count will be zero for binaries that already have
+ // dot symbols
+ if (synth_count < 0)
+ return 0;
"will be zero" then you check for less than zero?
+ asymbol **symp;
+ asymbol **new_mini;
Missing spaces.
+ long i;
Fold into the for() loop that uses it. size_t ?
+ new_mini = (asymbol **) malloc ((cur_symcount + 1) *
+ sizeof (*symp));
no space after malloc or sizeof
+ symp = new_mini;
+ memcpy (symp, minisyms, minisym_count * sizeof (*symp));
spacing after memcpy, sizeof
+ scoped_array<asymbol*> synth_syms;
space before *
+ synth_syms.reset(new asymbol*[cur_symcount + start]);
spacing around *
+ for (symbol_index_t i = 0; i <start; i++) {
+ synth_syms[i + cur_symcount] = bfd_syms[i];
+ }
+ for (symbol_index_t i = start; i < start + cur_symcount; i++) {
+ synth_syms[i] = *(new_mini + i);
+ }
spacing after <
'*(new_mini + i)' - weird... use [] ??
A nit - these loops are probably more readable without the braces.
+ cur_symcount = bfd_canonicalize_symtab(ibfd, bfd_syms.get()+start);
spacing around +
+uint op_bfd::process_symtab(bfd * ibfd, size_t start) {
brace placement
+ return bfd_canonicalize_symtab(ibfd, bfd_syms.get()+start);
spacing around +
+ /* Genreate symbols using bfd functions for
Generate
regards,
john
-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/Info/Sentarus/hamr30
_______________________________________________
oprofile-list mailing list
oprofile-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic