Commit Graph
45 Commits
Author SHA1 Message Date
David Spickett e15619abfe Add llvm-dwarfdump tool for C/C++ languages (#5726)
https://llvm.org/docs/CommandGuide/llvm-dwarfdump.html

This dumps the DWARF debugging information in a human readable form:
```
<source>: file format ELF64-x86-64

.debug_info contents:
0x00000000: Compile Unit: length = 0x00000063 version = 0x0004 abbr_offset = ... 

0x0000000b: DW_TAG_compile_unit
              DW_AT_producer  ("GNU C17 9.4.0 ...)
```

This tool would be useful to have when comparing the debug output of two
compiler versions or compiler targets. For instance I wanted to find out
recently how AArch64 and X86 targets represent TLS variables.

The tool runs on the compiled binary, so is post compilation. If the
binary
has no debug information the tool does not crash, it just tells you that
there is no information.

To fit the other llvm/clang tools, I've just added an "llvm-dwarfdump
(trunk)"
like llvm-mca has done. Added it to c/c++/objc/objc++ (open CL can't
compile
to binary so skipped those). MSVC is excluded because it produces PDB
files
instead.

The tool works for at least ELF and XCOFF files, I haven't been able to
test
any others.
2023-11-12 14:21:52 -06:00
Jeremy Rifkin 3eaa274904 Add nm (#5058)
Changes on top of #5057
2023-05-17 15:24:01 -04:00
Jeremy Rifkin 33c05780c9 Clarify a readelf / pahole error message and add readelf to defaults.properties (#5057) 2023-05-17 15:01:00 -04:00
Jeremy RifkinandMatt Godbolt 55dc09017e Compiler Picker UI Improvements (#4849)
Alrighty, round 2!

This PR makes the compiler picker dropdown taller (max height is to the
bottom of the screen)

![image](https://user-images.githubusercontent.com/51220084/224517409-17706ba6-fe85-444a-ad3b-f244f66eea5b.png)

I've added a toolbar button for opening the popout as well as a button
when the dropdown is open:


![image](https://user-images.githubusercontent.com/51220084/224517304-6478fca5-7bc1-4f87-b2ae-e9091d7d48bc.png)

![image](https://user-images.githubusercontent.com/51220084/224517317-83468805-1e9d-4bc6-8a4f-8786325f1e7b.png)

Then the modal interface allows text searching, filtering by compiler
category, and filtering by compiler instruction set. In the future I'd
like to replace the instructionSet property with an architecture
property so the filtering here can be a little better.


![image](https://user-images.githubusercontent.com/51220084/224517348-9cf40866-c5af-4274-84ba-21eb640ab2ea.png)

Demo of the category filtering:


![image](https://user-images.githubusercontent.com/51220084/224517529-5370b3f9-9ad3-4340-838a-b2d0a47c7467.png)

The text filtering highlights results the same as tomselect does:


![image](https://user-images.githubusercontent.com/51220084/224517490-d0dfa6d0-9b61-4be4-8cc7-ca4a4729a532.png)

I moved the favorites permanently to their own column so compilers
aren't jarringly shifted around the screen when favoriting /
unfavoriting.

Also added media queries so the modal looks ok on smaller screens:


![image](https://user-images.githubusercontent.com/51220084/224517563-bdf409c1-7e3a-4c73-812b-f02179b55799.png)


![image](https://user-images.githubusercontent.com/51220084/224517574-07fa2c8b-67d2-496d-9174-b1343e22bd62.png)

I think the only other two changes from the first PR are now the active
compiler is highlighted like it is in the tomselect dropdown and I
figured out how to reliably focus the search bar on modal open. (Oh, and
now clicking a compiler actually does something!)

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2023-03-12 17:07:44 -04:00
Jeremy Rifkin ea107a5ff9 More work needed, thanks for the comments Ruben and Matt! :)
Revert "Compiler picker UI improvements (#4789)"

This reverts commit d4a8c2bdb2.
2023-03-07 10:46:33 -05:00
Jeremy Rifkin d4a8c2bdb2 Compiler picker UI improvements (#4789)
Makes the compiler picker dropdown a bit taller, prevents the dropdown from overflowing the page, and also adds a compiler picker popup
2023-03-04 19:55:25 -05:00
Jeremy Rifkin c4c5cbe706 Add clang-tidy default tool to c/c++.defaults.properties (#4736)
(and clang-query default to c.defaults.properties)
2023-02-13 21:36:58 -05:00
Marc Poulhiès 69055681d9 Support for compiling to binary object (#3232) 2023-01-11 19:39:25 +01:00
Rubén Rincón Blanco cb39844d7f Ensure there are no duplicated compiler ids between hierarchies (#4003)
* Checks now always output which line is failing

* Ensure no duplicated compilerids between hierarchies
2022-08-29 17:08:42 -05:00
SvenandSven Johannsen 2168b968e7 update gcc and clang in default properties (#3126)
gcc & g++: 9,10,11
clang & clang++: 11,12
gfortran: 8,9,10,11

Co-authored-by: Sven Johannsen <s.johannsen@bretgeld-engineering.de>
2021-11-21 15:39:31 +01:00
Tom Ritter ff75d02bec Allow a tool to have a separate monaco editor for it's stdinput (#2785)
* Allow a tool to have a separate monaco editor for it's stdinput

* Fix bugs identified during code review.

 - Selection wasn't being persisted in state.
   Needed to do some kind of ugly things to make this work...
 - Closing and re-opening the panel wasn't persisting the input!
 - getToolInputViewWith -> getToolInputView
 - remove _currentDecoration
2021-07-24 09:12:05 -05:00
Tom Ritter 52b268801e Check for tool binary existance, and add some default c++ Tools (#2384)
* Add some default C++ tools that are commonly found

* Check for the presence of tool exe's and do not add them if not found
2021-01-14 22:00:32 +01:00
partouf 3668658afe compilerType=clang 2021-01-07 17:20:42 +00:00
Tom Ritter 615237ee44 Add clang compilers to the defaults file (#2376)
On ubuntu, you can install specific versions of the clang compiler and they
will be named similarly to the gcc compilers. Add these to the defaults file
so if they are there, they will be made available.
2021-01-07 18:19:05 +01:00
Austin Morton 3c4aa76707 Replace demanglerClassFile with demanglerType (#2225) 2020-09-23 05:34:30 -04:00
Matt Godbolt 67b1c2ba7e Use better sensible defaults for c++ compilers 2019-02-19 07:50:12 -06:00
Matt Godbolt de888d00b7 Add another binary function to hide 2019-01-07 21:03:20 -06:00
Partouf aa06fd8750 default off, added supportsLibraryCodeFilter property 2018-11-18 15:41:00 +01:00
Nicole Mazzuca 9ddf22f090 Support Visual C++ and Windows well
This commit adds support for hosting on windows, as well as better
support for the Visual C++ compiler. Specific interesting changes are:

  - switch from /FAsc to /FA
  - order functions in file order
  - support demangling win32-style identifiers with undname
  - clang++ and vc++ on win32 host are both supported
2018-07-28 15:18:43 -07:00
Matt Godbolt f6d0d77a75 Disable multiarch for amazon (and by default; workaround probably no longer needed!) 2018-07-14 17:55:23 -05:00
Partouf 03eb14126d oops 2018-04-22 15:15:53 +02:00
Partouf 7ed923d50d use property for demanglerClassFile and start using it 2018-04-22 15:15:52 +02:00
Ray Hamel 1b7c3a8051 If supported, set include paths w/ -isystem to quiet warnings in headers 2018-02-19 21:31:09 -05:00
Matt Godbolt ea31e8d1a4 Derive compile filename from the extensions 2017-12-05 18:59:17 -06:00
Matt Godbolt e108116d52 Fix up possible merge problem 2017-10-08 17:51:53 -05:00
apardoe@microsoft.com 3ea1b4ee60 Addressing feedback from RabsRicon 2017-09-27 14:50:56 -07:00
Andrew Pardoe 8aade5f7cb Merge remote-tracking branch 'godbolt/master' 2017-09-27 10:55:46 -07:00
cppchedy 297658e805 Merge branch 'master' of https://github.com/mattgodbolt/compiler-explorer
Conflicts:
	lib/base-compiler.js
2017-09-25 15:11:19 +01:00
Matt Godbolt 32516e130e Support not-demangling in binary mode too 2017-09-22 08:28:37 -05:00
Rubén 5a75995d3d Merge branch 'master' into master 2017-09-19 08:49:24 +02:00
Rubén 4c5f1bfd70 Add library inclusion dropdown
C++ is tested. Every other language is "unsupported" right now
D works (But there are no libs yet, I'm talking with
	@JohanEngelen to see which could be useful)
Haskell should work (Asked @TartanLlama if we could use some)
ispc should work
Every other language is unconfirmed. Please test if you can!

The syntaxis is similar to what's already there.
c++.amazon.properties has a working example which you can use
	as a template

If you find any broken piece, please let me know.
Thank to @mattgodbolt for the testing :D

This closes #490 for now. Maybe a newer ui pretties it up
2017-09-19 07:21:55 +02:00
cppchedy a2b754ca52 remove duplication 2017-09-17 23:49:55 +01:00
cppchedy 3dd2506044 adding support for control flow graph mode 2017-09-15 00:08:34 +01:00
Andrew Pardoe cbf45a9195 Adding WSL-CL and renaming CL.js to Wine-CL
Wine and WSL are really different compiler environments entirely.
There's no reason to try to handle them in the same file. Also, it
makes sense to rename the Wine one to avoid confusion.
2017-08-17 22:57:17 -07:00
Andrew Pardoe 78cf1209d8 Cleaned up changes to get rid of crazy parse fail 2017-08-17 22:19:58 -07:00
Matt Godbolt dfd691b826 Configurable objdump. Use GCC 6.3's binutils on the live site 2017-04-16 08:15:30 -05:00
Matt Godbolt b3d56fb935 Demangle *after* parsing ASM.
This means the ASM parser sees "simpler" mangled names, which makes its
primitive RegExp-based parser much simpler and more correct. Once we've
extracted labels etc, we can demangle the symbols.

This should address #193
2016-12-07 13:53:32 -06:00
Gabriel Devillers b70d82e867 Improved tabs in index.html / gcc.css
Minor changes in compiler.js.
Added error message in setCompilersInSlot so that the user is notified
(via console.log) if he did not set an adequate value to the setting defaultCompiler.
Moved the static javascript code handling tabs to gcc.js.
2016-08-05 11:51:48 +02:00
Gabriel Devillers 76e31d2840 Currently it is required to specify a default compilers.
This was done in etc/config/c++.defaults.properties
2016-08-05 11:51:48 +02:00
Matt Godbolt 2e43766d13 Update stub wrt to #106 2016-05-30 12:25:53 -05:00
Matt Godbolt 243539c3f3 Remove extraneous -O2 from options. Fixes #105 2016-03-14 07:48:29 -05:00
Matt Godbolt 775ac6c7d0 Use named parameters in stub main. Should fix #106 2016-03-14 07:17:49 -05:00
Matt Godbolt b8fca03914 More button fiddling 2015-11-28 13:46:39 -06:00
Matt Godbolt 0e55624881 Configurable binary support 2015-11-28 10:15:03 -06:00
Matt Godbolt 79a0f6e12d Misc WIP on changing configuration to be lang-specific and to fix up some more binary things found along the way 2015-11-26 13:12:56 -06:00