public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Multiple Target Failures for Multiple Definition of debug_printf
@ 2014-08-21 14:59 Joel Sherrill
  2014-08-21 15:49 ` Joel Sherrill
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Sherrill @ 2014-08-21 14:59 UTC (permalink / raw)
  To: gdb

Hi

I reported this earlier but wanted to provide some more details.

Multiple architectures fail when linking gdb due to debug_printf()
being multiply defined.

The architectures are: bfin, h8300, lm32, mips, moxie, and v850.

The debug_printf() in gdb/common/common-debug.c is very
simple. But the one in sim/common/sim-trace.c is more
complicated and has awareness of the simulator state.
Thus they can't be folded into one method.

There are 7 calls to debug_printf() in the sim/ tree but 203
in the gdb/ tree.

This all leads me to believe that the solution is to change
the name of the debug_printf() in sim/ to something like
sim_debug_printf().

Thoughts?

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill@OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985

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

* Re: Multiple Target Failures for Multiple Definition of debug_printf
  2014-08-21 14:59 Multiple Target Failures for Multiple Definition of debug_printf Joel Sherrill
@ 2014-08-21 15:49 ` Joel Sherrill
  2014-08-27  8:48   ` Gary Benson
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Sherrill @ 2014-08-21 15:49 UTC (permalink / raw)
  To: gdb

I hate to follow up to myself but the references to debug_printf()
in sim/ were the prototype, body, and multiple ChangeLog entries.

I if 0'ed the sim/ debug_printf() out and bfin now links.

Can someone else confirm that the debug_printf() under sim/
is unused and can be deleted?

Thanks.

--joel

On 8/21/2014 9:59 AM, Joel Sherrill wrote:
> Hi
>
> I reported this earlier but wanted to provide some more details.
>
> Multiple architectures fail when linking gdb due to debug_printf()
> being multiply defined.
>
> The architectures are: bfin, h8300, lm32, mips, moxie, and v850.
>
> The debug_printf() in gdb/common/common-debug.c is very
> simple. But the one in sim/common/sim-trace.c is more
> complicated and has awareness of the simulator state.
> Thus they can't be folded into one method.
>
> There are 7 calls to debug_printf() in the sim/ tree but 203
> in the gdb/ tree.
>
> This all leads me to believe that the solution is to change
> the name of the debug_printf() in sim/ to something like
> sim_debug_printf().
>
> Thoughts?
>

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill@OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985

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

* Re: Multiple Target Failures for Multiple Definition of debug_printf
  2014-08-21 15:49 ` Joel Sherrill
@ 2014-08-27  8:48   ` Gary Benson
  0 siblings, 0 replies; 3+ messages in thread
From: Gary Benson @ 2014-08-27  8:48 UTC (permalink / raw)
  To: Joel Sherrill; +Cc: gdb

Hi Joel,

Sorry for the slow reply, I was on vacation.

There is another thread about this, with a patch.  I'll copy you in
on it.

Cheers,
Gary

Joel Sherrill wrote:
> I hate to follow up to myself but the references to debug_printf()
> in sim/ were the prototype, body, and multiple ChangeLog entries.
> 
> I if 0'ed the sim/ debug_printf() out and bfin now links.
> 
> Can someone else confirm that the debug_printf() under sim/
> is unused and can be deleted?
> 
> Thanks.
> 
> --joel
> 
> On 8/21/2014 9:59 AM, Joel Sherrill wrote:
> > Hi
> >
> > I reported this earlier but wanted to provide some more details.
> >
> > Multiple architectures fail when linking gdb due to debug_printf()
> > being multiply defined.
> >
> > The architectures are: bfin, h8300, lm32, mips, moxie, and v850.
> >
> > The debug_printf() in gdb/common/common-debug.c is very
> > simple. But the one in sim/common/sim-trace.c is more
> > complicated and has awareness of the simulator state.
> > Thus they can't be folded into one method.
> >
> > There are 7 calls to debug_printf() in the sim/ tree but 203
> > in the gdb/ tree.
> >
> > This all leads me to believe that the solution is to change
> > the name of the debug_printf() in sim/ to something like
> > sim_debug_printf().
> >
> > Thoughts?
> >
> 
> -- 
> Joel Sherrill, Ph.D.             Director of Research & Development
> joel.sherrill@OARcorp.com        On-Line Applications Research
> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
> Support Available                (256) 722-9985

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

end of thread, other threads:[~2014-08-27  8:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-21 14:59 Multiple Target Failures for Multiple Definition of debug_printf Joel Sherrill
2014-08-21 15:49 ` Joel Sherrill
2014-08-27  8:48   ` Gary Benson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).