* [PATCH] Add 'extern C' if simulator is written in C++
@ 2018-12-31 11:54 Павел Крюков
2019-01-03 3:31 ` Simon Marchi
0 siblings, 1 reply; 4+ messages in thread
From: Павел Крюков @ 2018-12-31 11:54 UTC (permalink / raw)
To: gdb-patches; +Cc: vapier
Add 'extern C' if simulator is written in C++
sim/common/Changelog:
2018-12-31 Pavel I. Kryukov <kryukov@frtk.ru>
* sim-base.h: Add 'extern C' if header is compiled with C++
diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h
index 524195e8ad..e5f295458d 100644
--- a/sim/common/sim-base.h
+++ b/sim/common/sim-base.h
@@ -55,6 +55,10 @@ along with this program. If not, see <
http://www.gnu.org/licenses/>. */
#ifndef SIM_BASE_H
#define SIM_BASE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Pre-declare certain types. */
/* typedef <target-dependant> sim_cia; */
@@ -224,4 +228,8 @@ typedef struct {
SIM_DESC sim_state_alloc (SIM_OPEN_KIND kind, host_callback *callback);
void sim_state_free (SIM_DESC);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* SIM_BASE_H */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Add 'extern C' if simulator is written in C++
2018-12-31 11:54 [PATCH] Add 'extern C' if simulator is written in C++ Павел Крюков
@ 2019-01-03 3:31 ` Simon Marchi
2019-01-03 5:39 ` Павел Крюков
0 siblings, 1 reply; 4+ messages in thread
From: Simon Marchi @ 2019-01-03 3:31 UTC (permalink / raw)
To: Павел
Крюков
Cc: gdb-patches, vapier
On 2018-12-31 06:53, Ðавел ÐÑÑков wrote:
> Add 'extern C' if simulator is written in C++
That looks good to me, but can you just precise what's your use case so
I understand better? I suppose you have a sim port in a private fork of
binutils-gdb?
Simon
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Add 'extern C' if simulator is written in C++
2019-01-03 3:31 ` Simon Marchi
@ 2019-01-03 5:39 ` Павел Крюков
2019-01-03 14:47 ` Simon Marchi
0 siblings, 1 reply; 4+ messages in thread
From: Павел Крюков @ 2019-01-03 5:39 UTC (permalink / raw)
To: Simon Marchi; +Cc: gdb-patches, vapier
Yes, we're integrating GDB into our cycle-accurate simulator:
https://github.com/MIPT-ILab/mipt-sim-gdb
чт, 3 янв. 2019 г. в 06:31, Simon Marchi <simon.marchi@polymtl.ca>:
> On 2018-12-31 06:53, Павел Крюков wrote:
> > Add 'extern C' if simulator is written in C++
>
> That looks good to me, but can you just precise what's your use case so
> I understand better? I suppose you have a sim port in a private fork of
> binutils-gdb?
>
> Simon
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Add 'extern C' if simulator is written in C++
2019-01-03 5:39 ` Павел Крюков
@ 2019-01-03 14:47 ` Simon Marchi
0 siblings, 0 replies; 4+ messages in thread
From: Simon Marchi @ 2019-01-03 14:47 UTC (permalink / raw)
To: Павел
Крюков
Cc: gdb-patches, vapier
On 2019-01-03 00:39, Ðавел ÐÑÑков wrote:
> Yes, we're integrating GDB into our cycle-accurate simulator:
> https://github.com/MIPT-ILab/mipt-sim-gdb
Ok, thanks. Well it seems reasonable to me, and doesn't hurt in-tree
simulators to have that, so I've merged it.
Simon
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-01-03 14:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-31 11:54 [PATCH] Add 'extern C' if simulator is written in C++ Павел Крюков
2019-01-03 3:31 ` Simon Marchi
2019-01-03 5:39 ` Павел Крюков
2019-01-03 14:47 ` Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox