Skip to contentSkip to conversation

config.mk:Update DBGFLAGS with dwarf information

PATCH In review Prabhakar Kushwaha 5 participants 11 messages Feb 15, 2012 – Oct 15, 2012 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 config.mk:Update DBGFLAGS with dwarf information

Built u-boot elf file does not contain any dwarf informations by default. This information is required for debugging.

Add dwarf ver 2 flag in DBGFLAGS.

---
Applies on http://git.denx.de/u-boot.git branch master

 config.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
config.mk +1 -1
index ddaa477..11bc20d 100644
@@ -178,7 +178,7 @@ endif
 # who are porting old code to latest mainline but not updating $(AR).
 ARFLAGS = $(error update your Makefile to use cmd_link_o_target and not AR)
 RELFLAGS= $(PLATFORM_RELFLAGS)
-DBGFLAGS= -g # -DDEBUG
+DBGFLAGS= -g -gdwarf-2 # -DDEBUG
 OPTFLAGS= -Os #-fomit-frame-pointer
 
 OBJCFLAGS += --gap-fill=0xff
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/1 config.mk:Update DBGFLAGS with dwarf information

Hi,

This patch has review-pending from a very long time.

I request the "mailing-list" to review this patch.

Regards,
Prabhakar

Quoted 26 lines · Prabhakar Kushwaha

Built u-boot elf file does not contain any dwarf informations by default. This information is required for debugging.

Add dwarf ver 2 flag in DBGFLAGS.

---
Applies on http://git.denx.de/u-boot.git branch master

  config.mk |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
config.mk +1 -1
index ddaa477..11bc20d 100644
@@ -178,7 +178,7 @@ endif
  # who are porting old code to latest mainline but not updating $(AR).
  ARFLAGS = $(error update your Makefile to use cmd_link_o_target and not AR)
  RELFLAGS= $(PLATFORM_RELFLAGS)
-DBGFLAGS= -g # -DDEBUG
+DBGFLAGS= -g -gdwarf-2 # -DDEBUG
  OPTFLAGS= -Os #-fomit-frame-pointer
 
  OBJCFLAGS += --gap-fill=0xff
#2 lore raw

PATCH 1/1 config.mk:Update DBGFLAGS with dwarf information

Hi Wolfgang,

This patch has been pending for a very long time. No review comments has been provided.

Can you please review/accept this patch.

Regards,
Prabhakar

Quoted 46 lines · Prabhakar Kushwaha

Hi,

This patch has review-pending from a very long time.

I request the "mailing-list" to review this patch.

Regards,
Prabhakar

Quoted 27 lines · Prabhakar Kushwaha

Built u-boot elf file does not contain any dwarf informations by default. This
information is required for debugging.

Add dwarf ver 2 flag in DBGFLAGS.

---
Applies on http://git.denx.de/u-boot.git branch master

  config.mk |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
config.mk +1 -1
index ddaa477..11bc20d 100644
@@ -178,7 +178,7 @@ endif
  # who are porting old code to latest mainline but not updating $(AR).
  ARFLAGS = $(error update your Makefile to use cmd_link_o_target and 
 not AR)
  RELFLAGS= $(PLATFORM_RELFLAGS)
-DBGFLAGS= -g # -DDEBUG
+DBGFLAGS= -g -gdwarf-2 # -DDEBUG
  OPTFLAGS= -Os #-fomit-frame-pointer
 
Quoted 1 line
  OBJCFLAGS += --gap-fill=0xff

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#3 lore raw

PATCH 1/1 config.mk:Update DBGFLAGS with dwarf information

Hi Prabhakar,

Quoted 4 lines · Prabhakar Kushwaha

Hi Wolfgang,

This patch has been pending for a very long time. ?No review comments has been provided.

Mike Frysinger posted a comment on May 14, 2012:

[quote]
no real information here as to what is going wrong. the -g flag provides debug information and many people (myself included) have found this sufficient.

please describe your actual problem in detail and how this actually fixes things for you.
-mike

[/quote]

Regards,

Graeme

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

PATCH 1/1 config.mk:Update DBGFLAGS with dwarf information

Hi,

Sorry for the delayed response. I somehow missed this :(

Quoted 12 lines · Prabhakar Kushwaha

Hi Prabhakar,

Quoted 3 lines · Prabhakar Kushwaha

Hi Wolfgang,

This patch has been pending for a very long time. No review

comments has

Quoted 1 line

been provided.

Mike Frysinger posted a comment on May 14, 2012:

Quoted 10 lines

[quote]
no real information here as to what is going wrong. the -g flag provides debug
information and many people (myself included) have found this sufficient.

please describe your actual problem in detail and how this actually fixes things for you.
-mike

I agree with Mike's reply i.e. -g flag provides sufficient debug information.
But some debugger requires debug information in specific format i.e. -gdwarf-2
For example Freescale CodeWarrior Debugger

Regards,
Prabhakar

Quoted 61 lines
Quoted 59 lines · Prabhakar Kushwaha
Quoted 38 lines

Hi,

This patch has review-pending from a very long time.

I request the "mailing-list" to review this patch.

Regards,
Prabhakar

Quoted 28 lines · Prabhakar Kushwaha

Built u-boot elf file does not contain any dwarf informations by default. This
information is required for debugging.

Add dwarf ver 2 flag in DBGFLAGS.

---
Applies on http://git.denx.de/u-boot.git branch master

  config.mk |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
config.mk +0 -0
index ddaa477..11bc20d 100644
@@ -178,7 +178,7 @@ endif
  # who are porting old code to latest mainline but not updating 

$(AR).
ARFLAGS = $(error update your Makefile to use cmd_link_o_target
and not AR)
RELFLAGS= $(PLATFORM_RELFLAGS)

config.mk +1 -1
-DBGFLAGS= -g # -DDEBUG
+DBGFLAGS= -g -gdwarf-2 # -DDEBUG
  OPTFLAGS= -Os #-fomit-frame-pointer
Quoted 9 lines
Quoted 1 line
  OBJCFLAGS += --gap-fill=0xff

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#6 lore raw

PATCH 1/1 config.mk:Update DBGFLAGS with dwarf information

Hi Mike/Graeme.

Please help me in closing review related comments on this patch.

Thanks,
Prabhakar

Quoted 110 lines · Prabhakar Kushwaha

Hi,

Sorry for the delayed response. I somehow missed this :(

Quoted 18 lines · Prabhakar Kushwaha

Hi Prabhakar,

Quoted 3 lines · Prabhakar Kushwaha

Hi Wolfgang,

This patch has been pending for a very long time. No review

comments has

Quoted 1 line

been provided.

Mike Frysinger posted a comment on May 14, 2012:

[quote]
no real information here as to what is going wrong. the -g flag provides debug
information and many people (myself included) have found this sufficient.

Quoted 6 lines

please describe your actual problem in detail and how this actually fixes
things for you.
-mike

I agree with Mike's reply i.e. -g flag provides sufficient debug information.
But some debugger requires debug information in specific format i.e. -gdwarf-2
For example Freescale CodeWarrior Debugger

Regards,
Prabhakar

Quoted 54 lines
Quoted 54 lines · Prabhakar Kushwaha
Quoted 47 lines

Hi,

This patch has review-pending from a very long time.

I request the "mailing-list" to review this patch.

Regards,
Prabhakar

Quoted 24 lines · Prabhakar Kushwaha

Built u-boot elf file does not contain any dwarf informations by default. This
information is required for debugging.

Add dwarf ver 2 flag in DBGFLAGS.

---
Applies on http://git.denx.de/u-boot.git branch master

  config.mk |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
config.mk +0 -0
index ddaa477..11bc20d 100644
@@ -178,7 +178,7 @@ endif
  # who are porting old code to latest mainline but not updating 

$(AR).
ARFLAGS = $(error update your Makefile to use cmd_link_o_target
and not AR)
RELFLAGS= $(PLATFORM_RELFLAGS)

config.mk endif · line 184

Quoted 5 lines
config.mk +1 -1
-DBGFLAGS= -g # -DDEBUG
+DBGFLAGS= -g -gdwarf-2 # -DDEBUG
  OPTFLAGS= -Os #-fomit-frame-pointer
 
  OBJCFLAGS += --gap-fill=0xff

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Quoted 7 lines
Quoted 5 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#7 lore raw

PATCH 1/1 config.mk:Update DBGFLAGS with dwarf information

Hi Prabhakar

Quoted 4 lines · Prabhakar Kushwaha

Hi Mike/Graeme.

Please help me in closing review related comments on this patch.

I can't offer any comments either way regarding -gdwarf-2 as I have never done any runtime debugging of U-Boot

I was only pointing out that Mike had made a comment

That being said, I assume that this debugging information is stripped for release builds, so I don't see the harm in adding it

Regards,

Graeme

#8 lore raw

PATCH 1/1 config.mk:Update DBGFLAGS with dwarf information

In reply to Prabhakar Kushwaha

Dear Prabhakar Kushwaha,

Quoted 2 lines · In message <[email protected]> you wrote:

Please help me in closing review related comments on this patch.

It appears most people here on the mailing list see not much need for changing the debug flags, probbaly because nobody is using the single tool that seems to need the additional flags.

Maybe instead of adding this to the mainline source tree you can configure your debug tool to provide these settings on the make command line, overwriting the default settings?

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Gravitation cannot be held responsible for people falling in  love."
- Albert Einstein
#9 lore raw

PATCH 1/1 config.mk:Update DBGFLAGS with dwarf information

Thanks Wolfgang for the reply.

Please find my reply in-lined

Quoted 7 lines · Wolfgang Denk

Dear Prabhakar Kushwaha,

Quoted 1 line · In message <[email protected]> you wrote:

Please help me in closing review related comments on this patch.

It appears most people here on the mailing list see not much need for changing the debug flags, probbaly because nobody is using the single tool that seems to need the additional flags.

Yes.. it looks like the same :(

Quoted 4 lines

Maybe instead of adding this to the mainline source tree you can configure your debug tool to provide these settings on the make command line, overwriting the default settings?

I will definitely check this point in debug tool.
Or
may be I put debug option somewhere else, other than top level config.mk.

Regards,
Prabhakar

#10 lore raw

PATCH 1/1 config.mk:Update DBGFLAGS with dwarf information

In reply to Prabhakar Kushwaha
Quoted 2 lines · On Wednesday 15 February 2012 03:55:31 Prabhakar Kushwaha wrote:

Built u-boot elf file does not contain any dwarf informations by default. This information is required for debugging.

no real information here as to what is going wrong. the -g flag provides debug information and many people (myself included) have found this sufficient.

please describe your actual problem in detail and how this actually fixes things for you.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120514/228e6106/attachment.pgp>

#11 lore raw
In reply to Prabhakar Kushwaha
Quoted 7 lines · Prabhakar Kushwaha

Built u-boot elf file does not contain any dwarf informations by default. This information is required for debugging.

Add dwarf ver 2 flag in DBGFLAGS.

For posterity, with any recent enough toolchain, this shouldn't be needed. -g picks the best available debug format and that will be DWARF v2 symbols (which gdb happily uses).

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121015/404f700f/attachment.pgp>