Re: need for bsp_specs on x86_64

2018-05-09 Thread Amaan Cheval
Hi!

The WIP bsp_specs I've been using is here:
https://github.com/AmaanC/rtems/blob/ac/stub-x86-link-tests-pre-bspreorg-bak/c/src/lib/libbsp/x86_64/no_bsp/startup/bsp_specs

I think minimizing it and having the linker script take care of things
should be possible - I'll have to look into it as I port my branch to
the new BSPs layout and clean other WIP hacks up. I'm not familiar
enough with linker scripts and the way RTEMS builds yet, so this may
take a few days. I'll keep you guys updated as I make progress!

Thanks for bringing it up!

On Wed, May 9, 2018 at 2:16 AM, Joel Sherrill  wrote:
> Hi
>
> I have a working branch that I managed to shrink bsp_specs to
> being empty on some targets. It would be nice if we could
> do this from the beginning on x86_64.
>
> Are the options triggered by -qrtems really needed or implied
> already?
>
> For the BSPs I worked through, it was easy to move the start
> file specification to the linkcmds and eliminate the specification
> of libraries since they were mostly already correct inside gcc.
>
> Thanks.
>
> --joel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 2/2] sparc64 niagara, usiii: Remove -D options from cfg file and move to bspopts.h

2018-05-09 Thread Joel Sherrill
Updates #3425.
---
 bsps/sparc64/include/arch/arch.h  |  4 
 bsps/sparc64/include/arch/mm/frame.h  |  4 
 bsps/sparc64/include/arch/mm/mmu.h|  4 
 bsps/sparc64/include/arch/mm/tlb.h|  3 +++
 bsps/sparc64/include/arch/mm/tte.h|  4 
 bsps/sparc64/niagara/config/niagara.cfg   |  2 +-
 bsps/sparc64/usiii/config/usiii.cfg   |  2 +-
 c/src/lib/libbsp/sparc64/niagara/configure.ac |  4 
 c/src/lib/libbsp/sparc64/usiii/configure.ac   | 10 +-
 9 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/bsps/sparc64/include/arch/arch.h b/bsps/sparc64/include/arch/arch.h
index 5fdd4a2..36aa922 100644
--- a/bsps/sparc64/include/arch/arch.h
+++ b/bsps/sparc64/include/arch/arch.h
@@ -37,10 +37,14 @@
 #ifndef KERN_sparc64_ARCH_H_
 #define KERN_sparc64_ARCH_H_
 
+#include 
+
 #if defined (SUN4U)
 #include 
 #elif defined (SUN4V)
 #include 
+#else
+#error "No SUN model defined"
 #endif
 
 #define ASI_AIUP   0x10/** Access to primary context with user 
privileges. */
diff --git a/bsps/sparc64/include/arch/mm/frame.h 
b/bsps/sparc64/include/arch/mm/frame.h
index fb66e54..2fc17cc 100644
--- a/bsps/sparc64/include/arch/mm/frame.h
+++ b/bsps/sparc64/include/arch/mm/frame.h
@@ -35,10 +35,14 @@
 #ifndef KERN_sparc64_FRAME_H_
 #define KERN_sparc64_FRAME_H_
 
+#include 
+
 #if defined (SUN4U)
 #include 
 #elif defined (SUN4V)
 #include 
+#else
+#error "No SUN model defined"
 #endif
 
 #endif
diff --git a/bsps/sparc64/include/arch/mm/mmu.h 
b/bsps/sparc64/include/arch/mm/mmu.h
index 1d445f2..aab143f 100644
--- a/bsps/sparc64/include/arch/mm/mmu.h
+++ b/bsps/sparc64/include/arch/mm/mmu.h
@@ -35,10 +35,14 @@
 #ifndef KERN_sparc64_MMU_H_
 #define KERN_sparc64_MMU_H_
 
+#include 
+
 #if defined (SUN4U)
 #include 
 #elif defined (SUN4V)
 #include 
+#else
+#error "No SUN model defined"
 #endif
 
 
diff --git a/bsps/sparc64/include/arch/mm/tlb.h 
b/bsps/sparc64/include/arch/mm/tlb.h
index 4adf26c..7a6b85d 100644
--- a/bsps/sparc64/include/arch/mm/tlb.h
+++ b/bsps/sparc64/include/arch/mm/tlb.h
@@ -35,11 +35,14 @@
 #ifndef KERN_sparc64_TLB_H_
 #define KERN_sparc64_TLB_H_
 
+#include 
 
 #if defined (SUN4U)
 #include 
 #elif defined (SUN4V)
 #include 
+#else
+#error "No SUN model defined"
 #endif
 
 #endif
diff --git a/bsps/sparc64/include/arch/mm/tte.h 
b/bsps/sparc64/include/arch/mm/tte.h
index f0b746e..10a672b 100644
--- a/bsps/sparc64/include/arch/mm/tte.h
+++ b/bsps/sparc64/include/arch/mm/tte.h
@@ -35,10 +35,14 @@
 #ifndef KERN_sparc64_TTE_H_
 #define KERN_sparc64_TTE_H_
 
+#include 
+
 #if defined (SUN4U)
 #include 
 #elif defined (SUN4V)
 #include 
+#else
+#error "No SUN model defined"
 #endif
 
 #endif
diff --git a/bsps/sparc64/niagara/config/niagara.cfg 
b/bsps/sparc64/niagara/config/niagara.cfg
index 2fd8973..bfa73aa 100644
--- a/bsps/sparc64/niagara/config/niagara.cfg
+++ b/bsps/sparc64/niagara/config/niagara.cfg
@@ -7,7 +7,7 @@ RTEMS_CPU=sparc64
 
 #  This contains the compiler options necessary to select the CPU model
 #  and (hopefully) optimize for it.
-CPU_CFLAGS = -mcpu=niagara -DSUN4V
+CPU_CFLAGS = -mcpu=niagara
 
 # optimize flag: typically -g -O2
 CFLAGS_OPTIMIZE_V = -g -O2
diff --git a/bsps/sparc64/usiii/config/usiii.cfg 
b/bsps/sparc64/usiii/config/usiii.cfg
index b9fad21..ee1c508 100644
--- a/bsps/sparc64/usiii/config/usiii.cfg
+++ b/bsps/sparc64/usiii/config/usiii.cfg
@@ -7,7 +7,7 @@ RTEMS_CPU=sparc64
 
 #  This contains the compiler options necessary to select the CPU model
 #  and (hopefully) optimize for it.
-CPU_CFLAGS = -mcpu=ultrasparc3 -DUS3 -DSUN4U
+CPU_CFLAGS = -mcpu=ultrasparc3
 
 # optimize flag: typically -g -O2
 CFLAGS_OPTIMIZE_V = -g -O2
diff --git a/c/src/lib/libbsp/sparc64/niagara/configure.ac 
b/c/src/lib/libbsp/sparc64/niagara/configure.ac
index ced7e12..f8e9687 100644
--- a/c/src/lib/libbsp/sparc64/niagara/configure.ac
+++ b/c/src/lib/libbsp/sparc64/niagara/configure.ac
@@ -10,6 +10,10 @@ RTEMS_CANONICAL_TARGET_CPU
 AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2])
 RTEMS_BSP_CONFIGURE
 
+RTEMS_BSPOPTS_SET([SUN4V],[niagara],[1])
+RTEMS_BSPOPTS_SET([SUN4V],[*],[])
+RTEMS_BSPOPTS_HELP([SUN4V],
+[If defined, enable SUN model optons for the Niagara model.])
 
 RTEMS_BSP_CLEANUP_OPTIONS
 
diff --git a/c/src/lib/libbsp/sparc64/usiii/configure.ac 
b/c/src/lib/libbsp/sparc64/usiii/configure.ac
index 4244055..c99d938 100644
--- a/c/src/lib/libbsp/sparc64/usiii/configure.ac
+++ b/c/src/lib/libbsp/sparc64/usiii/configure.ac
@@ -10,13 +10,21 @@ RTEMS_CANONICAL_TARGET_CPU
 AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2])
 RTEMS_BSP_CONFIGURE
 
-
 RTEMS_BSPOPTS_SET([SIMSPARC_FAST_IDLE],[*],[])
 RTEMS_BSPOPTS_HELP([SIMSPARC_FAST_IDLE],
 [If defined, speed up the clock ticks while the idle task is running so
 time spent in the idle task is minimized.  This significantly reduces
 the wall time required to execute the RTEMS test suites.])
 
+RTEMS_BSPOPTS_SET([US3],[usiii],[1])
+RTEMS_BSPOPTS_SE

[PATCH 1/2] smdk2410: Move define of CPU_S3C2410 to bspopts.h

2018-05-09 Thread Joel Sherrill
Updates #3425.
---
 bsps/arm/smdk2410/config/smdk2410.cfg  | 2 +-
 bsps/arm/smdk2410/include/bsp/irq.h| 2 ++
 bsps/arm/smdk2410/include/s3c24xx.h| 4 
 c/src/lib/libbsp/arm/smdk2410/configure.ac | 7 +--
 4 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/bsps/arm/smdk2410/config/smdk2410.cfg 
b/bsps/arm/smdk2410/config/smdk2410.cfg
index b5720ca..2653672 100644
--- a/bsps/arm/smdk2410/config/smdk2410.cfg
+++ b/bsps/arm/smdk2410/config/smdk2410.cfg
@@ -8,7 +8,7 @@ RTEMS_CPU=arm
 
 #  This contains the compiler options necessary to select the CPU model
 #  and (hopefully) optimize for it.
-CPU_CFLAGS = -mcpu=arm920t -DCPU_S3C2410
+CPU_CFLAGS = -mcpu=arm920t
 
 # optimize flag: typically -O2
 CFLAGS_OPTIMIZE_V = -O2 -g
diff --git a/bsps/arm/smdk2410/include/bsp/irq.h 
b/bsps/arm/smdk2410/include/bsp/irq.h
index 8882b43..3f3fe92 100644
--- a/bsps/arm/smdk2410/include/bsp/irq.h
+++ b/bsps/arm/smdk2410/include/bsp/irq.h
@@ -86,6 +86,8 @@
 #define BSP_INT_RTC  30
 #define BSP_INT_ADC  31
 #define BSP_MAX_INT  32
+#else
+#error "Undefined Samsung CPU model"
 #endif
 
 #define BSP_INTERRUPT_VECTOR_MIN 0
diff --git a/bsps/arm/smdk2410/include/s3c24xx.h 
b/bsps/arm/smdk2410/include/s3c24xx.h
index 914b867..bb65608 100644
--- a/bsps/arm/smdk2410/include/s3c24xx.h
+++ b/bsps/arm/smdk2410/include/s3c24xx.h
@@ -8,10 +8,14 @@
 #ifndef S3C24XX_H_
 #define S3C24XX_H_
 
+#include 
+
 #ifdef CPU_S3C2400
 #include
 #elif defined CPU_S3C2410
 #include
+#else
+#error "Undefined Samsung CPU model"
 #endif
 
 #endif /*S3C24XX_H_*/
diff --git a/c/src/lib/libbsp/arm/smdk2410/configure.ac 
b/c/src/lib/libbsp/arm/smdk2410/configure.ac
index 8e5df41..9e79651 100644
--- a/c/src/lib/libbsp/arm/smdk2410/configure.ac
+++ b/c/src/lib/libbsp/arm/smdk2410/configure.ac
@@ -11,8 +11,6 @@ RTEMS_CANONICAL_TARGET_CPU
 AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2])
 RTEMS_BSP_CONFIGURE
 
-
-
 RTEMS_BSPOPTS_SET([ON_SKYEYE],[*],[])
 RTEMS_BSPOPTS_HELP([ON_SKYEYE],
 [If defined, enable options which optimize executingon the Skyeye
@@ -20,6 +18,11 @@ RTEMS_BSPOPTS_HELP([ON_SKYEYE],
  time spent in the idle task is minimized.  This significantly reduces
  the wall time required to execute the RTEMS test suites.])
 
+RTEMS_BSPOPTS_SET([CPU_S3C2410],[smdk2410],[1])
+RTEMS_BSPOPTS_SET([CPU_S3C2410],[*],[])
+RTEMS_BSPOPTS_HELP([CPU_S3C2410],
+[If defined, enable optons for the S3C2410 CPU model.])
+
 RTEMS_BSP_CLEANUP_OPTIONS
 
 # Explicitly list all Makefiles here
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: V2 Add DWARF support to the rtemstoolkit and put it to use.

2018-05-09 Thread Cillian O'Donnell
Just running covoar there, we seem to be running into some problems at the
source line lookup stage

cpod@cpod ~/development/rtems/leon3 $ covoar -S
/home/cpod/development/rtems/test/rtems-tools/tester/rtems/testing/coverage/score-symbols.ini
-O /home/cpod/coverage_test/test/score
-E/home/cpod/development/rtems/test/rtems-tools/tester/rtems/testing/coverage/Explanations.txt
-p RTEMS-5 -v sparc-rtems5/c/leon3/testsuites/samples/hello/hello.exe
Processing multiple executable/coverage file pairs
Coverage Format : html
Target  : sparc-rtems5

Coverage file sparc-rtems5/c/leon3/testsuites/samples/hello/hello.cov for
executable: sparc-rtems5/c/leon3/testsuites/samples/hello/hello.exe
Loading symbol sets:
/home/cpod/development/rtems/test/rtems-tools/tester/rtems/testing/coverage/score-symbols.ini
 Symbol set: score
 Loading library: sparc-rtems5/c/leon3/cpukit/score/libscore.a
cache:load-sym: object files: 192
cache:load-sym: symbols: 382
Analyzing 382 symbols
Extracting information from:
sparc-rtems5/c/leon3/testsuites/samples/hello/hello.exe
Created unified coverage map for _RTEMS_Lock_allocator (0x0 - 0x13)
Created unified coverage map for _RTEMS_Unlock_allocator (0x0 - 0x13)
Created unified coverage map for _API_Mutex_Lock (0x0 - 0x2f)
Created unified coverage map for _API_Mutex_Unlock (0x0 - 0x2f)
Created unified coverage map for _Chain_Initialize (0x0 - 0x4f)
Created unified coverage map for _Freechain_Initialize (0x0 - 0x33)
Created unified coverage map for _Freechain_Get (0x0 - 0x77)
Created unified coverage map for _Freechain_Put (0x0 - 0x27)
Created unified coverage map for _Heap_Allocate_aligned_with_boundary (0x0
- 0x23f)

...
...
Branch always taken found in_Workspace_Handler_initialization (0x4000ab8c -
0x4000ab8f)
Branch never taken found in _Workspace_Handler_initialization (0x1073785764
- 0x1073785767)
Branch never taken found in _Workspace_Handler_initialization (0x1073785776
- 0x1073785779)
Calculate statistics
Looking up source lines for uncovered ranges and branches
Looking up source lines for uncovered ranges in CSWTCH.1
terminate called after throwing an instance of 'rld::error'
Aborted


GDB


(gdb) bt
#0  0x774aa428 in __GI_raise (sig=sig@entry=6)
at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x774ac02a in __GI_abort () at abort.c:89
#2  0x77ae484d in __gnu_cxx::__verbose_terminate_handler() ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x77ae26b6 in ?? () from
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x77ae2701 in std::terminate() ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x77ae2919 in __cxa_throw ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x0042ad4a in rld::dwarf::address::path[abi:cxx11]() const (
this=this@entry=0x7fffcc10) at ../rtemstoolkit/rld-dwarf.cpp:129
#7  0x0042dfad in rld::dwarf::file::get_source
(this=this@entry=0x6be568,

addr=, source_file="unknown",
source_line=@0x7fffccdc: -1)
at ../rtemstoolkit/rld-dwarf.cpp:860
#8  0x0040d541 in Coverage::ExecutableInfo::getSourceAndLine (
this=this@entry=0x6be3c0, address=, line="")
at ../tester/covoar/ExecutableInfo.cc:134
#9  0x0040a115 in Coverage::DesiredSymbols::determineSourceLines (
this=this@entry=0xafee70, theRanges=theRanges@entry=0xd626f0,
theExecutable=0x6be3c0) at ../tester/covoar/DesiredSymbols.cc:411
#10 0x0040a24f in Coverage::DesiredSymbols::findSourceForUncovered (
this=0xafee70) at ../tester/covoar/DesiredSymbols.cc:440
#11 0x00406028 in main (argc=, argv=)
at ../tester/covoar/covoar.cc:526

I'll attach a trace file I'm using to debug, hopefully you can use this. It
has to go with hello.exe in the build directory

All the best,

Cillian.


On 8 May 2018 at 06:09, Chris Johns  wrote:

> Hi,
>
> This is a wrap up patch of all the issues that have been raise. Thanks to
> the excellent debugging and teamwork in finding the linking issue on Linux,
> that is a really strange one to trip over.
>
> The patches:
>
> - Add a DWARF framework to the rtemstoolkit to access the
>   source file and line given an address in an executable. This allows
>   us to remove exec'ing addr2line in covoar.
>
> - Add producer support to rtems-exe-info to list the compilers used
>   to build the executables plus list the common flags and optionally
>   list all the object files with the flags that are not common.
>
> - Clean up exception handling in destructors in some places. This
>   avoids a terminate if an exception is thrown in an exception
>   unwind.
>
> Changes since v1:
>
> - Fix rld::path::path_abs() to not walk above the root directory.
>
> - Fix a memory issue with the dwarf_srcfiles(). The libdwarf we are
>   using manages all memory and does not need to have it dealloced
>   while the man pages state it should be.
>
> - Add producer support to collect and manag

Re: V2 Add DWARF support to the rtemstoolkit and put it to use.

2018-05-09 Thread Chris Johns
On 10/5/18 8:47 am, Cillian O'Donnell wrote:
> Just running covoar there, we seem to be running into some problems at the
> source line lookup stage

Thank you for testing this. I assume it builds OK and we can run it?

> cpod@cpod ~/development/rtems/leon3 $ covoar -S
> /home/cpod/development/rtems/test/rtems-tools/tester/rtems/testing/coverage/score-symbols.ini
> -O /home/cpod/coverage_test/test/score
> -E/home/cpod/development/rtems/test/rtems-tools/tester/rtems/testing/coverage/Explanations.txt
> -p RTEMS-5 -v sparc-rtems5/c/leon3/testsuites/samples/hello/hello.exe
> Processing multiple executable/coverage file pairs
> Coverage Format : html
> Target  : sparc-rtems5
> 
> Coverage file sparc-rtems5/c/leon3/testsuites/samples/hello/hello.cov for
> executable: sparc-rtems5/c/leon3/testsuites/samples/hello/hello.exe
> Loading symbol sets:
> /home/cpod/development/rtems/test/rtems-tools/tester/rtems/testing/coverage/score-symbols.ini
>  Symbol set: score
>  Loading library: sparc-rtems5/c/leon3/cpukit/score/libscore.a
> cache:load-sym: object files: 192
> cache:load-sym: symbols: 382
> Analyzing 382 symbols
> Extracting information from: 
> sparc-rtems5/c/leon3/testsuites/samples/hello/hello.exe
> Created unified coverage map for _RTEMS_Lock_allocator (0x0 - 0x13)
> Created unified coverage map for _RTEMS_Unlock_allocator (0x0 - 0x13)
> Created unified coverage map for _API_Mutex_Lock (0x0 - 0x2f)
> Created unified coverage map for _API_Mutex_Unlock (0x0 - 0x2f)
> Created unified coverage map for _Chain_Initialize (0x0 - 0x4f)
> Created unified coverage map for _Freechain_Initialize (0x0 - 0x33)
> Created unified coverage map for _Freechain_Get (0x0 - 0x77)
> Created unified coverage map for _Freechain_Put (0x0 - 0x27)
> Created unified coverage map for _Heap_Allocate_aligned_with_boundary (0x0 - 
> 0x23f)
> 
> ...
> ...
> Branch always taken found in_Workspace_Handler_initialization (0x4000ab8c -
> 0x4000ab8f)
> Branch never taken found in _Workspace_Handler_initialization (0x1073785764 -
> 0x1073785767)
> Branch never taken found in _Workspace_Handler_initialization (0x1073785776 -
> 0x1073785779)
> Calculate statistics
> Looking up source lines for uncovered ranges and branches
> Looking up source lines for uncovered ranges in CSWTCH.1
> terminate called after throwing an instance of 'rld::error'
> Aborted
> 
> 
> GDB
> 
> 
> (gdb) bt
> #0  0x774aa428 in __GI_raise (sig=sig@entry=6)
>     at ../sysdeps/unix/sysv/linux/raise.c:54
> #1  0x774ac02a in __GI_abort () at abort.c:89
> #2  0x77ae484d in __gnu_cxx::__verbose_terminate_handler() ()
>    from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> #3  0x77ae26b6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> #4  0x77ae2701 in std::terminate() ()
>    from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> #5  0x77ae2919 in __cxa_throw ()
>    from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> #6  0x0042ad4a in rld::dwarf::address::path[abi:cxx11]() const (
>     this=this@entry=0x7fffcc10) at ../rtemstoolkit/rld-dwarf.cpp:129
> #7  0x0042dfad in rld::dwarf::file::get_source 
> (this=this@entry=0x6be568,
>     addr=, source_file="unknown", source_line=@0x7fffccdc: 
> -1)
>     at ../rtemstoolkit/rld-dwarf.cpp:860
> #8  0x0040d541 in Coverage::ExecutableInfo::getSourceAndLine (
>     this=this@entry=0x6be3c0, address=, line="")
>     at ../tester/covoar/ExecutableInfo.cc:134
> #9  0x0040a115 in Coverage::DesiredSymbols::determineSourceLines (
>     this=this@entry=0xafee70, theRanges=theRanges@entry=0xd626f0,
>     theExecutable=0x6be3c0) at ../tester/covoar/DesiredSymbols.cc:411
> #10 0x0040a24f in Coverage::DesiredSymbols::findSourceForUncovered (
>     this=0xafee70) at ../tester/covoar/DesiredSymbols.cc:440
> #11 0x00406028 in main (argc=, argv=)
>     at ../tester/covoar/covoar.cc:526

This looks like an exception being thrown in a destructor path.

> 
> I'll attach a trace file I'm using to debug, hopefully you can use this. It 
> has
> to go with hello.exe in the build directory

Thank you for this. I will try and see what I find.

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Errors returned while building a SPARC tool set

2018-05-09 Thread Danxue Huang
 Hi folks,

I just got a new laptop (Windows system) and I got stuck on building a
SPARC tool set using Ubuntu in Virtual Box. To build a SPARC tool set, I
use the command as below.

../source-builder/sb-set-builder --log=1-sparc.txt
--prefix=$HOME/development/rtems config/5/rtems-sparc64.bset

Is there anything wrong in it? After I input this command, it kept building
for an hour but finally returned "Build FAILED", errors returned as below.

error: building sparc-rtems5-gdb-8.0.1-x86_64-linux-gnu-1

I also attached l-sparc.txt which is used to build a SPARC tool set, I
would appreciate that if any of you can do me a favor to check it.

Thank you so much!

Best,
Dannie
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Errors returned while building a SPARC tool set

2018-05-09 Thread Aditya Upadhyay
Hi Dannie,

Did you check the python version? It should be a development version.
First run this command:
sudo apt-get python2.7-dev

then try
../source-builder/sb-set-builder --log=1-sparc.txt
--prefix=$HOME/development/rtems config/5/rtems-sparc64.bset

Hope, It will solve your problem.

Regards,
aditya

On Thu, May 10, 2018 at 10:21 AM, Danxue Huang  wrote:
> Hi folks,
>
> I just got a new laptop (Windows system) and I got stuck on building a SPARC
> tool set using Ubuntu in Virtual Box. To build a SPARC tool set, I use the
> command as below.
>
> ../source-builder/sb-set-builder --log=1-sparc.txt
> --prefix=$HOME/development/rtems config/5/rtems-sparc64.bset
>
> Is there anything wrong in it? After I input this command, it kept building
> for an hour but finally returned "Build FAILED", errors returned as below.
>
> error: building sparc-rtems5-gdb-8.0.1-x86_64-linux-gnu-1
>
> I also attached l-sparc.txt which is used to build a SPARC tool set, I would
> appreciate that if any of you can do me a favor to check it.
>
> Thank you so much!
>
> Best,
> Dannie
>
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: V2 Add DWARF support to the rtemstoolkit and put it to use.

2018-05-09 Thread Cillian O'Donnell
On Thu, 10 May 2018, 03:43 Chris Johns,  wrote:

> On 10/5/18 8:47 am, Cillian O'Donnell wrote:
> > Just running covoar there, we seem to be running into some problems at
> the
> > source line lookup stage
>
> Thank you for testing this. I assume it builds OK and we can run it?
>

Builds with a couple of warnings, other than that it's fine. Hopefully no
issues on freebsd.

>
> > cpod@cpod ~/development/rtems/leon3 $ covoar -S
> >
> /home/cpod/development/rtems/test/rtems-tools/tester/rtems/testing/coverage/score-symbols.ini
> > -O /home/cpod/coverage_test/test/score
> >
> -E/home/cpod/development/rtems/test/rtems-tools/tester/rtems/testing/coverage/Explanations.txt
> > -p RTEMS-5 -v sparc-rtems5/c/leon3/testsuites/samples/hello/hello.exe
> > Processing multiple executable/coverage file pairs
> > Coverage Format : html
> > Target  : sparc-rtems5
> >
> > Coverage file sparc-rtems5/c/leon3/testsuites/samples/hello/hello.cov for
> > executable: sparc-rtems5/c/leon3/testsuites/samples/hello/hello.exe
> > Loading symbol sets:
> >
> /home/cpod/development/rtems/test/rtems-tools/tester/rtems/testing/coverage/score-symbols.ini
> >  Symbol set: score
> >  Loading library: sparc-rtems5/c/leon3/cpukit/score/libscore.a
> > cache:load-sym: object files: 192
> > cache:load-sym: symbols: 382
> > Analyzing 382 symbols
> > Extracting information from:
> sparc-rtems5/c/leon3/testsuites/samples/hello/hello.exe
> > Created unified coverage map for _RTEMS_Lock_allocator (0x0 - 0x13)
> > Created unified coverage map for _RTEMS_Unlock_allocator (0x0 - 0x13)
> > Created unified coverage map for _API_Mutex_Lock (0x0 - 0x2f)
> > Created unified coverage map for _API_Mutex_Unlock (0x0 - 0x2f)
> > Created unified coverage map for _Chain_Initialize (0x0 - 0x4f)
> > Created unified coverage map for _Freechain_Initialize (0x0 - 0x33)
> > Created unified coverage map for _Freechain_Get (0x0 - 0x77)
> > Created unified coverage map for _Freechain_Put (0x0 - 0x27)
> > Created unified coverage map for _Heap_Allocate_aligned_with_boundary
> (0x0 - 0x23f)
> > 
> > ...
> > ...
> > Branch always taken found in_Workspace_Handler_initialization
> (0x4000ab8c -
> > 0x4000ab8f)
> > Branch never taken found in _Workspace_Handler_initialization
> (0x1073785764 -
> > 0x1073785767)
> > Branch never taken found in _Workspace_Handler_initialization
> (0x1073785776 -
> > 0x1073785779)
> > Calculate statistics
> > Looking up source lines for uncovered ranges and branches
> > Looking up source lines for uncovered ranges in CSWTCH.1
> > terminate called after throwing an instance of 'rld::error'
> > Aborted
> >
> > 
> > GDB
> > 
> >
> > (gdb) bt
> > #0  0x774aa428 in __GI_raise (sig=sig@entry=6)
> > at ../sysdeps/unix/sysv/linux/raise.c:54
> > #1  0x774ac02a in __GI_abort () at abort.c:89
> > #2  0x77ae484d in __gnu_cxx::__verbose_terminate_handler() ()
> >from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> > #3  0x77ae26b6 in ?? () from
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> > #4  0x77ae2701 in std::terminate() ()
> >from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> > #5  0x77ae2919 in __cxa_throw ()
> >from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> > #6  0x0042ad4a in rld::dwarf::address::path[abi:cxx11]() const (
> > this=this@entry=0x7fffcc10) at ../rtemstoolkit/rld-dwarf.cpp:129
> > #7  0x0042dfad in rld::dwarf::file::get_source (this=this@entry
> =0x6be568,
> > addr=, source_file="unknown",
> source_line=@0x7fffccdc: -1)
> > at ../rtemstoolkit/rld-dwarf.cpp:860
> > #8  0x0040d541 in Coverage::ExecutableInfo::getSourceAndLine (
> > this=this@entry=0x6be3c0, address=, line="")
> > at ../tester/covoar/ExecutableInfo.cc:134
> > #9  0x0040a115 in Coverage::DesiredSymbols::determineSourceLines
> (
> > this=this@entry=0xafee70, theRanges=theRanges@entry=0xd626f0,
> > theExecutable=0x6be3c0) at ../tester/covoar/DesiredSymbols.cc:411
> > #10 0x0040a24f in
> Coverage::DesiredSymbols::findSourceForUncovered (
> > this=0xafee70) at ../tester/covoar/DesiredSymbols.cc:440
> > #11 0x00406028 in main (argc=, argv= out>)
> > at ../tester/covoar/covoar.cc:526
>
> This looks like an exception being thrown in a destructor path.
>
> >
> > I'll attach a trace file I'm using to debug, hopefully you can use this.
> It has
> > to go with hello.exe in the build directory
>
> Thank you for this. I will try and see what I find.
>
> Chris
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel