gdb patches to RBS

Jiri Gaisler jiri at gaisler.se
Fri Nov 14 23:30:49 UTC 2014



On 11/14/2014 02:34 AM, Chris Johns wrote:
> On 14/11/2014 9:12 am, Jiri Gaisler wrote:
>>
>> What is the procedure to add gdb patches to RBS?
>>
> 
> Patches are first accepted by the RTEMS Project as the definition of the tools belongs to the project and tool packagers, ie the RSB, need to adopt that definition to get a project tick. Patches should be posted upstream where possible and then referenced from there. If the
> upstream does not have a suitable method to reference patches we can add them to the rtems-tools.git repo under the tools directory. There are specific cases such as the openrisc tools where a specific github instance is referenced as we have a positive undertaking from that
> community the tools are being merged upstream. Examples of upstream patch referencing is qemu and patchworks.
> 
> I do not see a patch management system for gdb. There was talk back in April of this year of gdb using patchworks and then something else however it seems to have died out.
> 
>> I have a few patches that fixes the erc32 simulator and also
>> add support for leon2 and leon3. This would allow us to drop
>> the sis bsp, and also to test the leon2 and leon3 bsp's with
>> sis.
> 
> Excellent. I suggest you provide git patches for the rtems-tools.git repo to add the patches and then provide RSB patches for the sparc gdb build to use them. There are specific sparc patches already present which need updating as they are currently stopping us moving off gdb-7.7.

I tried to move RBS to gdb-7.8.1, but there were several other
dependency problems that I could not (easily) fix. So I have back-ported
my patches to gdb-7.7 which seems to work equally well. I will send the
patches for rtems-tools and rtems-source-builder to Chris off-list as the
patch is quite large (300K). I built the sparc toolchain with RBS
and copied the sis patch to rtems/patches manually since I have not
write access to rtems-tools.git. This worked fine, and gdb now runs
leon2/3 binaries:


$ sparc-rtems4.11-gdb ~/src/rtems/b2/sparc-rtems4.11/c/leon2/testsuites/samples/ticker/ticker.exe

GNU gdb (GDB) 7.7
Reading symbols from /home/jiri/src/rtems/b2/sparc-rtems4.11/c/leon2/testsuites/samples/ticker/ticker.exe...done.
(gdb) tar sim -leon2 -v

 SIS - SPARC instruction simulator 2.8
 Bug-reports to Jiri Gaisler (jiri at gaisler.se)

LEON2 emulation enabled
CPU freq 50.0 MHz
RAM start: 0x40000000, RAM size: 16384 K, ROM size: 16384 K
serial port A on stdin/stdout
GPT started (period 65536)
Connected to the simulator.
(gdb) lo
file /home/jiri/src/rtems/b2/sparc-rtems4.11/c/leon2/testsuites/samples/ticker/ticker.exe is big-endian.
loading /home/jiri/src/rtems/b2/sparc-rtems4.11/c/leon2/testsuites/samples/ticker/ticker.exe:
section .text at 0x40000000 (0x17930 bytes)
section .data at 0x40017930 (0x590 bytes)
section .bss at 0x40017ec0 (0x2050 bytes)(not loaded)
(gdb) run
Starting program: /home/jiri/src/rtems/b2/sparc-rtems4.11/c/leon2/testsuites/samples/ticker/ticker.exe
resuming at 40000000


*** BEGIN OF TEST CLOCK TICK ***
TA1  - rtems_clock_get_tod - 09:00:00   12/31/1988
TA2  - rtems_clock_get_tod - 09:00:00   12/31/1988
TA3  - rtems_clock_get_tod - 09:00:00   12/31/1988
TA1  - rtems_clock_get_tod - 09:00:05   12/31/1988
TA2  - rtems_clock_get_tod - 09:00:10   12/31/1988
TA1  - rtems_clock_get_tod - 09:00:10   12/31/1988
TA3  - rtems_clock_get_tod - 09:00:15   12/31/1988
TA1  - rtems_clock_get_tod - 09:00:15   12/31/1988
TA2  - rtems_clock_get_tod - 09:00:20   12/31/1988
TA1  - rtems_clock_get_tod - 09:00:20   12/31/1988
TA1  - rtems_clock_get_tod - 09:00:25   12/31/1988
TA3  - rtems_clock_get_tod - 09:00:30   12/31/1988
TA1  - rtems_clock_get_tod - 09:00:30   12/31/1988
TA2  - rtems_clock_get_tod - 09:00:30   12/31/1988
*** END OF TEST CLOCK TICK ***
[Inferior 1 (process 42000) exited normally]
(gdb)


More information about the devel mailing list