Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Revisit gdb/12528 for bare metal targets
@ 2014-07-30  8:21 Yao Qi
  2014-08-01 13:29 ` Yao Qi
                   ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Yao Qi @ 2014-07-30  8:21 UTC (permalink / raw)
  To: gdb-patches

I see the following fail on arm-none-eabi target,

(gdb) b 24^M
Breakpoint 1 at 0x4: file
../../../../git/gdb/testsuite/gdb.base/break-on-linker-gcd-function.cc,
line 24.^M
(gdb) FAIL: gdb.base/break-on-linker-gcd-function.exp: b 24

This test case is for PR gdb/12528, but I don't think this PR is fixed
for bare metal targets.

Paul asked for the advice for this PR
<https://sourceware.org/ml/gdb-patches/2011-03/msg00662.html> about how
to determine whether an address zero in debug info means the
corresponding code has been GC'ed.
Then, flag has_section_at_zero was chosen and the code is like:

	case DW_LNE_set_address:
	  address = read_address (abfd, line_ptr, cu, &bytes_read);

	  if (address == 0 && !dwarf2_per_objfile->has_section_at_zero)
	    {
	      /* This line table is for a function which has been
		 GCd by the linker.  Ignore it.  PR gdb/12528 */

On some bare metal targets, .text section is located at 0x0 so
has_section_at_zero is true.  That is why this test fails.  I am
looking for something else to check, for example, if ADDRESS is zero
and address zero isn't within any SEC_LOAD sections of CU
("break-on-linker-gcd-function.cc"), then the function should be GC'ed
by the linker.  I am not familiar with the stuff about CU and symbols,
so I'd like your advice on it.  TIA.

-- 
Yao (齐尧)


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2014-09-19  9:09 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-30  8:21 Revisit gdb/12528 for bare metal targets Yao Qi
2014-08-01 13:29 ` Yao Qi
2014-08-06  6:54 ` [PATCH 1/2] Remove pst from dwarf_decode_lines_1 Yao Qi
2014-08-06  6:54   ` [PATCH 2/2] Check function is GC'ed Yao Qi
2014-08-15  4:40     ` Doug Evans
2014-08-15  6:19       ` Yao Qi
2014-08-20 15:40     ` Pedro Alves
2014-08-13 12:01   ` [PATCH 1/2] Remove pst from dwarf_decode_lines_1 Yao Qi
2014-08-13 18:58     ` Doug Evans
2014-08-14 23:53       ` Yao Qi
2014-08-15  2:04         ` Yao Qi
2014-08-21  8:26 ` [PATCH 1/3] Check function is GC'ed Yao Qi
2014-08-21  8:26   ` [PATCH 2/3] Check data " Yao Qi
2014-08-22 18:02     ` Doug Evans
2014-08-29 13:32       ` Yao Qi
2014-08-21  8:26   ` [PATCH 3/3] Run dw2-var-zero-addr.exp with --readnow Yao Qi
2014-08-22 18:06     ` Doug Evans
2014-09-19  9:09       ` Yao Qi
2014-08-22 17:40   ` [PATCH 1/3] Check function is GC'ed Doug Evans
2014-08-28 10:50     ` Yao Qi
2014-09-15  8:06       ` Yao Qi
2014-09-15 18:53       ` Doug Evans
2014-09-16  2:40         ` Yao Qi
2014-09-18 16:42           ` Doug Evans
2014-09-19  9:08             ` Yao Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox