Page MenuHomePhabricator
Feed Advanced Search

Jul 10 2018

paulsemel updated the diff for D49043: [llvm-objdump] Add -demangle (-C) option.

Added warning function and checked for bad style in the option checking part

Jul 10 2018, 6:56 AM
paulsemel added inline comments to D49043: [llvm-objdump] Add -demangle (-C) option.
Jul 10 2018, 1:02 AM
paulsemel updated the diff for D49043: [llvm-objdump] Add -demangle (-C) option.

Warn for bad demangling styles.
Added tests for different styles.

Jul 10 2018, 1:02 AM

Jul 7 2018

paulsemel added inline comments to D49043: [llvm-objdump] Add -demangle (-C) option.
Jul 7 2018, 3:06 PM
paulsemel updated the diff for D49043: [llvm-objdump] Add -demangle (-C) option.

Added @davide suggestions

Jul 7 2018, 3:06 PM

Jul 6 2018

paulsemel created D49043: [llvm-objdump] Add -demangle (-C) option.
Jul 6 2018, 2:01 PM
paulsemel updated the diff for D49016: [llvm-objdump] Add dynamic section printing to private-headers option.

Added a test

Jul 6 2018, 5:46 AM
paulsemel added a comment to D49016: [llvm-objdump] Add dynamic section printing to private-headers option.

Sorry, forgot to add the test. I will do it after lunch !

Jul 6 2018, 3:21 AM
paulsemel created D49016: [llvm-objdump] Add dynamic section printing to private-headers option.
Jul 6 2018, 3:19 AM

Jul 5 2018

paulsemel added a comment to D48904: [llvm-objdump] Add --archive-headers (-a) option.

Ok, for an unknown reason, the disassembly part is not working on some bots..
I removed it, but will work on it tomorrow.
Again, I'm really sorry about it..

Jul 5 2018, 9:57 AM
paulsemel committed rL336370: [llvm-objdump] Removed archive-headers-disas test.
[llvm-objdump] Removed archive-headers-disas test
Jul 5 2018, 9:54 AM
paulsemel committed rL336363: [llvm-objcopy] Fix timezone dependant tests.
[llvm-objcopy] Fix timezone dependant tests
Jul 5 2018, 8:29 AM
paulsemel added a comment to D48904: [llvm-objdump] Add --archive-headers (-a) option.

Arf.. @jhenderson forgot that the time was timezone dependent.. can I push a patch ?

Jul 5 2018, 8:23 AM
paulsemel closed D48904: [llvm-objdump] Add --archive-headers (-a) option.

Arf.. Again, I forgot to mention the revision in the commit.. I'll try to think about it next time :)

Jul 5 2018, 7:49 AM
paulsemel committed rL336357: [llvm-objdump] Add --archive-headers (-a) option.
[llvm-objdump] Add --archive-headers (-a) option
Jul 5 2018, 7:48 AM
paulsemel added inline comments to D48904: [llvm-objdump] Add --archive-headers (-a) option.
Jul 5 2018, 6:41 AM
paulsemel updated the diff for D48904: [llvm-objdump] Add --archive-headers (-a) option.

Put back the two newlines

Jul 5 2018, 6:41 AM
paulsemel added inline comments to D48904: [llvm-objdump] Add --archive-headers (-a) option.
Jul 5 2018, 5:42 AM
paulsemel updated the diff for D48904: [llvm-objdump] Add --archive-headers (-a) option.

Ok, so it appears that I can't trigger the error anymore, because I move the call to printArchiveChild to the DumpObject function.
In the DumpArchive function, when the object is ill-formed, we are just ignoring and going to the next file.
I think we can let it like this, as it is barely not possible to test the behavior now..

Jul 5 2018, 3:40 AM

Jul 4 2018

paulsemel added a comment to D48281: [llvm-readobj] Add -hex-dump (-x) option.

ping @dblaikie :)
I'd really like to go forward on this one, to be able to refact the -p option :)

Jul 4 2018, 1:44 PM
paulsemel added a comment to D48904: [llvm-objdump] Add --archive-headers (-a) option.

Alright :)
The fact is that this error is often occurring on the first entry when we create the archive file with GNU ar (I don't know why, I have to admit it). So, if we throw an error when we encounter this, we are simply not printing any entry of those files at all... (but the other entries are ok !)
That's actually what GNU objdump is doing. It is just reporting the file as not parsable in the archive, and going to the next file.
I think this is a good behavior. What do you think ?

Jul 4 2018, 10:43 AM
paulsemel updated the diff for D48904: [llvm-objdump] Add --archive-headers (-a) option.

Added Jame's suggestions.

Jul 4 2018, 10:42 AM
paulsemel closed D48810: [llvm-objdump] Add --file-headers (-f) option.

Forgot to add Differential Revision in the commit, closing the revision

Jul 4 2018, 8:30 AM
paulsemel committed rL336284: [llvm-objdump] Add --file-headers (-f) option.
[llvm-objdump] Add --file-headers (-f) option
Jul 4 2018, 8:30 AM
paulsemel updated the diff for D48904: [llvm-objdump] Add --archive-headers (-a) option.

Added Jame's suggestions.
Totally agree with all your points James (except the error one, as it might break the whole behavior)

Jul 4 2018, 6:22 AM
paulsemel updated the diff for D48810: [llvm-objdump] Add --file-headers (-f) option.

Should I land ?

Jul 4 2018, 4:41 AM
paulsemel updated the diff for D48810: [llvm-objdump] Add --file-headers (-f) option.

Added Jame's suggestions

Jul 4 2018, 3:23 AM
paulsemel added a comment to D48281: [llvm-readobj] Add -hex-dump (-x) option.

Perhaps generalized further still - if every format has the ability to retrieve a section by name or by index and return a generic llvm::object::SectionRef - then the code can be written in general over that, query the SectionRef for the name and contents, etc?

Well, I thought about it, but the problem is that the interface are a bit different.. I tried to change the interface COFF (which is the only one that needs changes), but it would break too much things if I do so..

Jul 4 2018, 3:08 AM

Jul 3 2018

paulsemel created D48904: [llvm-objdump] Add --archive-headers (-a) option.
Jul 3 2018, 4:35 PM
paulsemel added a comment to D48810: [llvm-objdump] Add --file-headers (-f) option.
Jul 3 2018, 1:38 PM
paulsemel updated the diff for D48810: [llvm-objdump] Add --file-headers (-f) option.

Added Jame's suggestions

Jul 3 2018, 1:38 PM
paulsemel updated the diff for D48810: [llvm-objdump] Add --file-headers (-f) option.

Applied Jame's suggestions

Jul 3 2018, 8:11 AM
paulsemel added a comment to D48810: [llvm-objdump] Add --file-headers (-f) option.

About the other informations: I think they are more "format specific" and thus I wanted to add an other patch for it. Do you want me to do it in this patch ?

Jul 3 2018, 4:01 AM
paulsemel added a comment to D48271: [llvm-readobj] Fix printing format.

Just to end this out of bounds possibility : in the failing test, the text section is at the middle of the binary. So, even if I was going out-of-bounds, there shouldn't be corruption.
I'm completely lost with what is going wrong with this one..

Jul 3 2018, 3:57 AM
paulsemel added a comment to D48281: [llvm-readobj] Add -hex-dump (-x) option.

Perhaps generalized further still - if every format has the ability to retrieve a section by name or by index and return a generic llvm::object::SectionRef - then the code can be written in general over that, query the SectionRef for the name and contents, etc?

Jul 3 2018, 1:44 AM

Jul 2 2018

paulsemel added a comment to D48271: [llvm-readobj] Fix printing format.

Sure: https://reviews.llvm.org/D47989
As you can see, the bounds haven't changed. That's why I really don't understand the error (and honestly, the error could have been more verbose...)
Here is the version I pushed: https://reviews.llvm.org/rL336058

Jul 2 2018, 3:09 PM
paulsemel added a comment to D48271: [llvm-readobj] Fix printing format.

I got a build fail here : http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/10648
As for now, I still don't know why I'm getting this error, but I guessed it was because I was passing the raw_stream..
This should fix this, I hope

I'd guess it's pretty unlikely that it's the passing of a raw_ostream by reference - that's a pretty common thing. To my mind, the code that looks more likely to be crashing there is that maybe the StringRef is out-of-bounds and the range-based for loop is running off the end of the underlying buffer.

Have you tried running the test under valgrind? asan? msan? things like that. You might be able to reproduce/identify the crash on your machine so you can validate a fix rather than throwing it at the buildbots again.

Jul 2 2018, 3:03 PM
paulsemel added a reviewer for D48810: [llvm-objdump] Add --file-headers (-f) option: jhenderson.
Jul 2 2018, 9:13 AM
paulsemel updated the diff for D48810: [llvm-objdump] Add --file-headers (-f) option.

Fixing trailing white space.

Jul 2 2018, 9:12 AM
paulsemel updated the diff for D48281: [llvm-readobj] Add -hex-dump (-x) option.

Refactor code to create a generic function.
Applied David and Eric' suggestions.

Jul 2 2018, 5:57 AM

Jul 1 2018

paulsemel reopened D48271: [llvm-readobj] Fix printing format.
Jul 1 2018, 2:59 PM
paulsemel updated the diff for D48271: [llvm-readobj] Fix printing format.

I got a build fail here : http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/10648
As for now, I still don't know why I'm getting this error, but I guessed it was because I was passing the raw_stream..
This should fix this, I hope

Jul 1 2018, 2:59 PM
paulsemel created D48810: [llvm-objdump] Add --file-headers (-f) option.
Jul 1 2018, 11:30 AM
paulsemel committed rL336061: Revert "[llvm-readobj] Fix printing format".
Revert "[llvm-readobj] Fix printing format"
Jul 1 2018, 4:58 AM
paulsemel committed rL336058: [llvm-readobj] Fix printing format.
[llvm-readobj] Fix printing format
Jul 1 2018, 2:56 AM
paulsemel closed D48271: [llvm-readobj] Fix printing format.
Jul 1 2018, 2:56 AM

Jun 29 2018

paulsemel updated the diff for D48271: [llvm-readobj] Fix printing format.

Refactor printing function.

Jun 29 2018, 10:15 AM
paulsemel added inline comments to D48281: [llvm-readobj] Add -hex-dump (-x) option.
Jun 29 2018, 9:59 AM
paulsemel added a comment to D47953: [builtin] Add bitfield support for __builtin_dump_struct.

This doesn't seem to build for me - so hard to debug/probe it:

llvm/src/tools/clang/lib/CodeGen/CGBuiltin.cpp:1264:65: error: no viable conversion from 'clang::QualType' to 'llvm::Type *'

CGF.CGM.getDataLayout().getTypeSizeInBits(CanonicalType),
                                          ^~~~~~~~~~~~~

llvm/src/include/llvm/IR/DataLayout.h:560:53: note: passing argument to parameter 'Ty' here
inline uint64_t DataLayout::getTypeSizeInBits(Type *Ty) const {

^

1 error generated.

Jun 29 2018, 9:47 AM
paulsemel updated the diff for D47953: [builtin] Add bitfield support for __builtin_dump_struct.

Fixed version problem. Now building.

Jun 29 2018, 9:46 AM

Jun 27 2018

paulsemel added a comment to D48622: [llvm-objdump] Add -x --all-headers options.

It seems to be displaying the correct information.
I just noticed that we are not printing dynamic section in the -private-headers option, this might somehow be fixed.

LGTM, but please, wait for @echristo approval :)

We also lack -a (--archive-headers) and -f (--file-headers) :)

Jun 27 2018, 1:33 PM
paulsemel accepted D48622: [llvm-objdump] Add -x --all-headers options.

It seems to be displaying the correct information.
I just noticed that we are not printing dynamic section in the -private-headers option, this might somehow be fixed.

Jun 27 2018, 2:37 AM
paulsemel added a reviewer for D48622: [llvm-objdump] Add -x --all-headers options: echristo.
Jun 27 2018, 2:04 AM

Jun 22 2018

paulsemel added a comment to D47953: [builtin] Add bitfield support for __builtin_dump_struct.

First thanks all for reviewing !

Jun 22 2018, 7:23 AM
paulsemel updated the diff for D48281: [llvm-readobj] Add -hex-dump (-x) option.

Added other binary formats handling.

Jun 22 2018, 6:46 AM
paulsemel added a comment to D48271: [llvm-readobj] Fix printing format.

*looks at this a bit more closely*

Ah, OK, so this is a string dumping mode - why is it dumping non-printable characters at all? (I assumed this was reimplementing/matching behavior of some existing tool (in the same way that llvm-objdump is meant to be like the binutils 'objdump' tool - I just assumed there was a 'readobj' tool out there somewhere, but googling around I don't immediately see anything like that)) more like the way the 'strings' tool would work?

Or is this trying to match some existing/similar behavior elsewhere?

Jun 22 2018, 12:44 AM

Jun 21 2018

paulsemel updated the diff for D48271: [llvm-readobj] Fix printing format.

Added a test with non printable characters.

Jun 21 2018, 1:49 PM

Jun 20 2018

paulsemel added a comment to D48281: [llvm-readobj] Add -hex-dump (-x) option.

Could/should this be format-agnostic? (looks like this change only implements the functionality for ELF - but I'd imagine the existence of sections and their contents might be general enough to allow for different object file formats to support this without each format having custom handling)

Jun 20 2018, 4:37 PM
paulsemel added inline comments to D48271: [llvm-readobj] Fix printing format.
Jun 20 2018, 4:36 PM
paulsemel updated the diff for D48281: [llvm-readobj] Add -hex-dump (-x) option.

Fixed overflow on section when section end is inbetween rows.
Added test.

Jun 20 2018, 2:17 AM
paulsemel added a comment to D47953: [builtin] Add bitfield support for __builtin_dump_struct.

I will for sure add tests @lebedev.ri . Fact is that, for the moment, this is not working as expected.
This is why I am asking for a bit of help about this bitfield handling :)

Jun 20 2018, 1:18 AM

Jun 19 2018

paulsemel updated the diff for D48271: [llvm-readobj] Fix printing format.

Added tests

Jun 19 2018, 9:30 AM
paulsemel added a comment to D48281: [llvm-readobj] Add -hex-dump (-x) option.

Could you add a test case?

Jun 19 2018, 9:11 AM

Jun 18 2018

paulsemel created D48281: [llvm-readobj] Add -hex-dump (-x) option.
Jun 18 2018, 7:15 AM
paulsemel created D48271: [llvm-readobj] Fix printing format.
Jun 18 2018, 3:36 AM

Jun 15 2018

paulsemel added inline comments to D47989: [llvm-readobj] Add -string-dump (-p) option.
Jun 15 2018, 7:21 AM
paulsemel committed rL334834: [llvm-readobj] Add -string-dump (-p) option.
[llvm-readobj] Add -string-dump (-p) option
Jun 15 2018, 7:19 AM
paulsemel closed D47989: [llvm-readobj] Add -string-dump (-p) option.
Jun 15 2018, 7:19 AM

Jun 14 2018

paulsemel added a comment to D47953: [builtin] Add bitfield support for __builtin_dump_struct.

ping :) @aaron.ballman

Jun 14 2018, 2:36 PM
paulsemel added a comment to D47989: [llvm-readobj] Add -string-dump (-p) option.

ping :)

Jun 14 2018, 10:09 AM

Jun 9 2018

paulsemel updated the diff for D47989: [llvm-readobj] Add -string-dump (-p) option.

Wrong diff. Updated to right one.

Jun 9 2018, 3:53 PM
paulsemel created D47989: [llvm-readobj] Add -string-dump (-p) option.
Jun 9 2018, 3:53 PM

Jun 8 2018

paulsemel added a comment to D47953: [builtin] Add bitfield support for __builtin_dump_struct.

This version is working for non packed structures. For packed structures, it might sometimes work, sometimes not.
The resulting assembly code seems to be the right one.
If someone went through bitfields manipulation, please do not hesitate to comment !
Requesting for help :)

Jun 8 2018, 10:22 AM
paulsemel created D47953: [builtin] Add bitfield support for __builtin_dump_struct.
Jun 8 2018, 10:20 AM

Jun 7 2018

paulsemel accepted D47855: [llvm-objcopy] Remove unused field from Object.

LGTM

Jun 7 2018, 6:41 AM
paulsemel committed rL334196: [llvm-objdump] Add -R option.
[llvm-objdump] Add -R option
Jun 7 2018, 6:35 AM
paulsemel closed D47493: [llvm-objdump] Add -R option.
Jun 7 2018, 6:35 AM
paulsemel committed rL334182: [llvm-strip] Expose --strip-unneeded option.
[llvm-strip] Expose --strip-unneeded option
Jun 7 2018, 3:09 AM
paulsemel closed D47818: [llvm-strip] Expose --strip-unneeded option.
Jun 7 2018, 3:09 AM

Jun 6 2018

paulsemel added a comment to D47493: [llvm-objdump] Add -R option.

Some of the logic in the function feels awkward, but that's a cleanup for another time probably.

-eric

Jun 6 2018, 3:48 PM
paulsemel added a comment to D47818: [llvm-strip] Expose --strip-unneeded option.

Hey I'm away but I got a bug report requesting -x as an alias in
llvm-strip. I haven't looked at the code for this patch so it might already
be solved here but I'd appreciate it being added. No worries either way.
I'll just add it when aight get back of it isn't there.

Best,
Jake

Jun 6 2018, 2:27 PM
paulsemel added inline comments to D47818: [llvm-strip] Expose --strip-unneeded option.
Jun 6 2018, 5:22 AM
paulsemel updated the diff for D47818: [llvm-strip] Expose --strip-unneeded option.

Added Jame's suggestions

Jun 6 2018, 5:22 AM
paulsemel created D47818: [llvm-strip] Expose --strip-unneeded option.
Jun 6 2018, 3:43 AM
paulsemel accepted D47750: [llvm-strip] Expose --discard-all option.

LGTM too :)

Jun 6 2018, 1:56 AM
paulsemel added a comment to D47493: [llvm-objdump] Add -R option.

Thanks for reviewing :)

Jun 6 2018, 1:55 AM
paulsemel updated the diff for D47493: [llvm-objdump] Add -R option.

Added explanatory comment for the undef variable.

Jun 6 2018, 1:55 AM

Jun 5 2018

paulsemel added a comment to D47750: [llvm-strip] Expose --discard-all option.

First, thanks for the patch :)
I think @jhenderson pointed out something important. If you do strip -x foo -o bar, you will notice that it will only discard local symbols from the binary.
This is not really what's happening with this behavior.. (as you mentioned, this removes symbol table, and that's why you can't test the -x option alone)
Maybe we should fix this ? What do you think ? :)

Jun 5 2018, 3:08 PM

Jun 4 2018

paulsemel updated the diff for D47493: [llvm-objdump] Add -R option.

Added long option.

Jun 4 2018, 8:46 AM

Jun 3 2018

paulsemel updated the diff for D47493: [llvm-objdump] Add -R option.

Fix TODO comment.

Jun 3 2018, 6:46 AM
paulsemel updated the diff for D47493: [llvm-objdump] Add -R option.

Added helper function to get dynamic relocation sections.

Jun 3 2018, 6:42 AM

Jun 2 2018

paulsemel accepted D47674: [llvm-strip] Add missing aliases for --strip-debug.

LGTM :)

Jun 2 2018, 2:34 PM

Jun 1 2018

paulsemel committed rL333772: [llvm-objcopy] Fix null symbol handling.
[llvm-objcopy] Fix null symbol handling
Jun 1 2018, 9:24 AM
paulsemel closed D47414: [llvm-objcopy] Fix null symbol handling.
Jun 1 2018, 9:24 AM
paulsemel added inline comments to D47414: [llvm-objcopy] Fix null symbol handling.
Jun 1 2018, 3:20 AM
paulsemel updated the diff for D47414: [llvm-objcopy] Fix null symbol handling.

Applied James' suggestions.

Jun 1 2018, 3:20 AM

May 31 2018

paulsemel updated the diff for D47414: [llvm-objcopy] Fix null symbol handling.

Applied James' changes.
Added test for null symbol name.

May 31 2018, 6:52 AM
paulsemel updated the diff for D47414: [llvm-objcopy] Fix null symbol handling.
May 31 2018, 5:57 AM

May 30 2018

paulsemel added a comment to D47414: [llvm-objcopy] Fix null symbol handling.

Ok, I'm getting back to you because I really think that we want to go forward on this one, as this fixes a really "big" bug.

May 30 2018, 8:59 AM
paulsemel accepted D47505: [llvm-strip] Add -o option.

LGTM

May 30 2018, 8:51 AM