Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I use the specified objdump #229

Closed
laomaolaile opened this issue Jan 5, 2023 · 5 comments
Closed

How can I use the specified objdump #229

laomaolaile opened this issue Jan 5, 2023 · 5 comments

Comments

@laomaolaile
Copy link

laomaolaile commented Jan 5, 2023

I want to view the elf file in the project, but it is garbled,
Modify the configuration in .cproject, and change “org.eclipse.cdt.core.ELF” to “org.eclipse.cdt.core.GNU_ ELF“, eclipse can call objdump in the environment variable of the computer, but I want to specify my own objdump. How should I implement this?

image
image

The gcc I want to use is in my toolchain
image

@jld01
Copy link
Contributor

jld01 commented Jan 5, 2023

Take a look at org.eclipse.cdt.utils.DefaultGnuToolFactory.getObjdumpPath() which implements the default behaviour. If you need to change this behaviour, you will need to override getObjdumpPath() in a subclass or experiment with providing the "objdump" extension data.

@laomaolaile
Copy link
Author

Take a look at org.eclipse.cdt.utils.DefaultGnuToolFactory.getObjdumpPath() which implements the default behaviour. If you need to change this behaviour, you will need to override getObjdumpPath() in a subclass or experiment with providing the "objdump" extension data.

Thank you for answering my question.
I guess that the "objdump" extension data can be passed in through "plugin.xml", but the correct method has not been found. Can you give me a demo for reference,Thank you very much.

@jld01
Copy link
Contributor

jld01 commented Apr 16, 2023

We are working on improved support for objdump in issue #361.

@jld01
Copy link
Contributor

jld01 commented May 4, 2023

CDT 11.2.0 M2 and later versions should support invoking the build of objdump provided by your own GNU toolchain on a generated ELF executable file as follows:

  • Select the GNU Elf Parser binary parser for each build configuration
  • In the case of a cross-compilation toolchain, define a CDT Build Variable named gnu_tool_prefix of type String providing the tool name prefix including the trailing hyphen (eg arm-none-eabi-) for each build configuration

CDT will search for the objdump tool on the PATH configured for the relevant build configuration.

@jld01
Copy link
Contributor

jld01 commented Aug 23, 2023

Issue is addressed via #361.

@jld01 jld01 closed this as completed Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants