|
Re: gcc 9 and 10 |
Posted on: 2/12 12:27
#81 |
---|---|---|
Home away from home
![]() ![]() Joined:
2007/9/11 12:31 From Russia
Posts: 6825
|
@sTix
Quote:
Without native git, we at least can use cross-compiler's git, or even download from the web, but without native GDB with dwarf4 support, we can't debug os4 bins in realtime (even that patch about which I told before didn't help, because once you link binary building with dwarf2 but with all those stubs .a libs which build with dwarf4, GDB then still cry that this is dwarf4 and can't do shit with). Quote:
As far as I see, gdb 8.3 on morphos use Binutils-2.33.1. Why exactly that one dunno, probably the author of gdb port just sticks to it for internal reasons, so I mean Binutils. From another side, maybe it will be easier to add dwarf4 support to our current gdb version? Btw, by core utils means what ones? Native versions of make, awk, bison, new python, Perl, sed, cp, cat, and all that ? If so, it also not of _that_ big problem, because again, it at least can be solved in some way by using cross-compiler, while without native GDB you can do shit in terms of debugging :) IMHO, native GDB is that which we need 100% and it really necessary, and not cross-compilers, not virtual machines can cover it at the moment. |
|
|
Re: gcc 9 and 10 |
Posted on: 2/12 12:31
#82 |
---|---|---|
Just popping in
![]() ![]() Joined:
2020/11/17 12:08 From Slough
Posts: 133
|
One trick you can use with git is to access your sgit folder from a different (non Amiga) machine, to execute commands sgit does not support
I recently did this to execute the 'remote' command to link my repo to github. Then one can push, pull and commit as usual. Also I wonder if anyone has tried to build git under AmiCygnix so it could at least be run from there. There are some pure python implementations of git too. |
|
|
Re: gcc 9 and 10 |
Posted on: 2/12 12:45
#83 |
---|---|---|
Just popping in
![]() ![]() Joined:
2011/7/20 20:01 From In the sticks
Posts: 143
|
@kas1e
I absolutely agree that gdb would be a game changer as development would be sooooo much easier with a working debugger. |
|
|
Re: gcc 9 and 10 |
Posted on: 2/12 12:52
#84 |
---|---|---|
Just popping in
![]() ![]() Joined:
2011/7/20 20:01 From In the sticks
Posts: 143
|
@sTix
Quote:
I started work on upgrading to the latest libgit2, and got it using AmiSSL rather than a static older version of OpenSSL, but I stopped when I hit the fact the it uses mmap () and munmap () now. I think there was only one or two instances where it was writing to a mmap'd buffer, the rest were just reading which is obviously easier to deal with. My build environment could use the older libgit2 or a newer one so I'm going to update the instructions on my forked repo as how to build the different versions and see if I can get the energy to have another crack at it. Anyone willing to help work on it would be very appreciated! ![]() |
|
|
Re: gcc 9 and 10 |
Posted on: 2/12 13:11
#85 |
---|---|---|
Just popping in
![]() ![]() Joined:
2006/11/30 11:59 From Lund, Sweden
Posts: 130
|
@kas1e
I didn't know this, but gcc 10 still supports dwarf 2 using the '-gdwarf-2' option. Using that, it's possible to load binaries using the gdb from the official SDK. Most things don't work though, I can inspect sources but break points don't work. When I tried it with the old compiler in the SDK it's the same thing. Is gdb in the SDK broken or am I missing something? I've tried both the stabs and the dwarf 2 format. |
|
|
Re: gcc 9 and 10 |
Posted on: 2/12 13:29
#86 |
---|---|---|
Home away from home
![]() ![]() Joined:
2007/9/11 12:31 From Russia
Posts: 6825
|
@sTix
Quote:
Yeah, but problem that most libs (those which on os4depot ones, any older local builds of developers, etc), build with more or less decent versions of GCC. And even if you build dwarf2 binary , but link it with those libs which were build as it (so dwarf4), GDB then says "dwarf4, sorry". Quote:
Yeah, it has heavily broken as far as I can see now. On x5000 even if I just load the binary into, and do "break main", and then "r", it just didn't break on main, but exit instead. I need to check if it works on peg2 at all now. And if is, then it mean x5000 specific (at least we have something of that sort with Alfkil when debug spotless and db101 until he loose motivation) |
|
|
Re: gcc 9 and 10 |
Posted on: 2/12 13:48
#87 |
---|---|---|
Just popping in
![]() ![]() Joined:
2006/11/30 11:59 From Lund, Sweden
Posts: 130
|
@kas1e
It would be good with a working baseline before someone (again, I don't want to point any fingers in my direction ![]() |
|
|
Re: gcc 9 and 10 |
Posted on: 2/12 14:13
#88 |
---|---|---|
Just popping in
![]() ![]() Joined:
2006/11/30 11:59 From Lund, Sweden
Posts: 130
|
@kas1e
Quote: Btw, by core utils means what ones? Native versions of make, awk, bison, new python, Perl, sed, cp, cat, and all that ? If so, it also not of _that_ big problem, because again, it at least can be solved in some way by using cross-compiler, while without native GDB you can do shit in terms of debugging :) IMHO, native GDB is that which we need 100% and it really necessary, and not cross-compilers, not virtual machines can cover it at the moment. It's these ones: http://www.maizure.org/projects/decoded-gnu-coreutils/ True, they're not that important TBH. |
|
|
Re: gcc 9 and 10 |
Posted on: 2/12 14:33
#89 |
---|---|---|
Just popping in
![]() ![]() Joined:
2006/11/30 11:59 From Lund, Sweden
Posts: 130
|
@billyfish
Quote: I started work on upgrading to the latest libgit2, and got it using AmiSSL rather than a static older version of OpenSSL, but I stopped when I hit the fact the it uses mmap () and munmap () now. I think there was only one or two instances where it was writing to a mmap'd buffer, the rest were just reading which is obviously easier to deal with. My build environment could use the older libgit2 or a newer one so I'm going to update the instructions on my forked repo as how to build the different versions and see if I can get the energy to have another crack at it. Nice. But the mmap and munmap problem shouldn't be too hard if the mapped file fits into memory (thanks to the Amiga way of managing memory). I might overlook something, but isn't it just mmap -> read the whole file into a buffer, munmap -> write buffer to file? Quote: Anyone willing to help work on it would be very appreciated! We desperately need more people. |
|
|
Re: gcc 9 and 10 |
Posted on: 2/12 14:35
#90 |
---|---|---|
Home away from home
![]() ![]() Joined:
2007/9/11 12:31 From Russia
Posts: 6825
|
@sTix
Quote:
Tried the same GDB on pegasos2 and on x5000. On pegasos2 tracing/breakpoints works, on X5000 didn't. So as peg2 is G4, but x5000 are not and mean to be "embedded kind" in means their debugging facilities are different too. X5000 CPU has a special debug interrupt, but this one is different from the trace interrupt in G4. This means that needs to be taken into account when making tracing/breakpoint works on x5000. In other words, it means some x5000 specific code probably. |
|
|
Re: gcc 9 and 10 |
Posted on: 2/12 14:40
#91 |
---|---|---|
Just popping in
![]() ![]() Joined:
2006/11/30 11:59 From Lund, Sweden
Posts: 130
|
@NinjaCyborg
Quote: One trick you can use with git is to access your sgit folder from a different (non Amiga) machine, to execute commands sgit does not support ![]() |
|
|
Re: gcc 9 and 10 |
Posted on: 2/12 14:48
#92 |
---|---|---|
Just popping in
![]() ![]() Joined:
2006/11/30 11:59 From Lund, Sweden
Posts: 130
|
@kas1e
Quote: Tried the same GDB on pegasos2 and on x5000. On pegasos2 tracing/breakpoints works, on X5000 didn't. Excellent, then it works, sort of. The neccessary changes should be out there somewhere I guess. Whoever is doing an embedded application with this CPU ought to have what we're looking for. |
|
|
Re: gcc 9 and 10 |
Posted on: 2/12 15:54
#93 |
---|---|---|
Home away from home
![]() ![]() Joined:
2007/9/11 12:31 From Russia
Posts: 6825
|
@sTix
Quote:
When I ask Thomas about it half of year ago, he says "They have a special debug interrupt that is completely different from the trace interrupt in previous architectures. The facilities themselves do exist, but you have to write special code for it." He wasn't sure at this time if the debug interrupt routes over the TRAP exception handler at all, but he doesn't think there is any way to discern which one it is. But from that discussion come this enhancement request: https://execsg.solie.ca/mantis/view.php?id=52 This is done with the comment "Debug interrupt can now be accessed via TRAPNUM_TRACE (this more or less ties in with previous incarnations of the facilities)". So, we just need to test it all if it works, etc. EDIT: I also think we may have some issues with "alignment" : on x5000 CPU, as it misses 4 opcodes (lfs, lfsu, stfs, stfsu). without which we always need to align the data/code, etc. That can be another reason why old gdb didn't work on x5000 too. And, there were another report, x5000 specific too: https://execsg.solie.ca/mantis/view.php?id=53 Maybe all of this needs to be taken into account and tested/retested. Edited by kas1e on 2021/2/12 17:11:56
|
|
|
Re: gcc 9 and 10 |
Posted on: 2/12 18:16
#94 |
---|---|---|
Just popping in
![]() ![]() Joined:
2006/11/30 11:59 From Lund, Sweden
Posts: 130
|
@kas1e
Interesting. But is it possible for normal users to get access to the bug tracker? Do you have MorphOS on your x5000 BTW? It would be interesting to see if / how gdb works there. |
|
|
Re: gcc 9 and 10 |
Posted on: 2/12 20:15
#95 |
---|---|---|
Home away from home
![]() ![]() Joined:
2007/9/11 12:31 From Russia
Posts: 6825
|
@sTix
Quote:
I were under impression that this is public. Strange if it not .. Quote:
On on peg2 at moment, but about to buy a gfx card specially for morphos tests as well. So will have it after a week or so. |
|
|
Re: gcc 9 and 10 |
Posted on: 2/18 10:21
#96 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3974
|
@sTix
This is pretty sure not a genuine crash of gcc9/10 but probably a long standing one. (Haven't tested with anything else than gcc10.1.0) If i set the stack of WB shell to the lowest possible (65528) and try to compile my project, i *always* get a very hard crash with no grimreaper coming up and only rudimentary output on serial.
kernel 54.30 (1.1.2021) AmigaOne X1000 release
Does anyone know why? Doesn't gmake use a stack cookie? Shouldn't that be handled by the system? I've raised the stack in shell to 500.000 again and it started to compile. |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: gcc 9 and 10 |
Posted on: 2/18 11:56
#97 |
---|---|---|
Just popping in
![]() ![]() Joined:
2006/11/30 11:59 From Lund, Sweden
Posts: 130
|
@Raziel
Yes, gcc needs a lot of stack. A stack cookie is a good idea if there isn't one there already (I haven't looked but I'll do that tonight). But picking a good value is less straight forward than for a 'normal' application since it depends on what source code you're working with of course. Perhaps we should just give it 'a lot', 10M or so. A more ambitious approach would be to pick a big project (let's say kas1es OWB) and use Valgrind (Massif) to get a real measurement and add some on top of that. Does it crash when compiling or when linking BTW? |
|
|
Re: gcc 9 and 10 |
Posted on: 2/18 12:25
#98 |
---|---|---|
Just popping in
![]() ![]() Joined:
2006/11/30 11:59 From Lund, Sweden
Posts: 130
|
@raziel
I have 10 minutes until the next meeting so I had a peek anyway ![]() There's a cookie in there: static const char * __attribute__((used)) amigaos_stack_cookie = "$STACK:768000"; *Oh*, now I see what you're writing. It's *make*. I guess I need to take another look then ![]() |
|
|
Re: gcc 9 and 10 |
Posted on: 2/18 12:53
#99 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3974
|
@sTix
Yup, sorry. Tired after nightshifts. Its gmake that crashes and it doesn't matter what source file, it will crash as soon as gmake is invoked. I have a big project (scummvm) here and am just trying with 500kb of stack, which doesnt throw any errors upto now. Before that I had the shell set to 2 mb, but I thought that must be overkill, so I went on to see what happens if I drain the stack...well, not that good idea of an idea. |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: gcc 9 and 10 |
Posted on: 2/18 13:11
#100 |
---|---|---|
Just popping in
![]() ![]() Joined:
2006/11/30 11:59 From Lund, Sweden
Posts: 130
|
@Raziel
I was also a bit to quick ![]() |
|